POST/video/assets/{asset_id}/analytics

Get analytics for a video asset

Retrieves analytics for a single video asset. Supply group_by, date_range, and metrics to choose the reporting interval, date range, and data to return. Use page_number and page_size to control pagination for applicable results.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 5 body fields
asset_idstringrequired

The Gumlet asset ID to retrieve analytics for.

Analytics request specifying the grouping interval, date range, metrics, and optional pagination settings.

date_rangeobjectrequired

Date interval for the analytics; include start_at and end_at in yyyy-MM-dd format.

group_bystringrequired

Group the data by this period.

Allowed:dailymonthlyweekly
metricsarray<string>required

List of metrics to return in response.

page_numberintegeroptional

Page number to fetch. Starting at 1

page_sizeintegeroptional

Number of items to return per page

5 status codes
200Returns the requested analytics data, with fields for selected metrics such as views, impressions, playing time, heatmap, top locations, devices, browsers, pages, and widget data.
01M2QP6KS1HM1JE912S8K9DJ2Nunknownoptional
heatmaparray<object>optional

Heatmap data

impressionsarray<object>optional
playing_timearray<object>required
top_browsersarray<object>optional

Data for top browsers

top_citiesarray<object>optional

Data for top cities

top_countriesarray<object>optional

Data for top countries

top_device_typesarray<object>optional

Data for top device types

top_pagesarray<object>optional

Data for top pages

viewsarray<object>optional

Views data

widget_dataobjectoptional
400Returned when the request is invalid.

One documented failure

  • asset_id_not_valid

    The asset ID is not valid.

errorobjectrequired
401Returned when the API key or bearer token is missing or invalid.

One documented failure

  • invalid_api_key

    API key supplied with request is invalid

errorobjectrequired
403Returned when the account has unpaid dues or the authenticated user lacks the required role permissions.

One documented failure

  • unauthorized

    You don't have access to this feature. Please contact your organization owner.

errorobjectrequired
500Returned when an internal server error occurs.

One documented failure

  • internal_server_error

    We have encountered some server error. We have been notified and will fix it soon.

errorobjectrequired

Error handling

A 400 is returned when the request is invalid; group_by must be daily, monthly, or weekly, and date_range must include start_at and end_at in yyyy-MM-dd format. A 401 is returned when the API key or bearer token is missing or invalid. A 403 is returned when the account has unpaid dues or the authenticated user lacks the required role permissions. A 500 indicates an internal server error. The asset_id path parameter must identify the asset to analyze.