POST/insights/aggregated-data

Get aggregated viewer analytics

Retrieves aggregated values for selected metrics in a video workspace over a specified timeframe. Provide aggregate, workspace_id, and timeframe, and optionally use filters to limit the data included. The timeframe can span no more than 60 days.

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

4 body fields

Aggregated analytics query for a workspace and timeframe, with optional filters.

aggregatearray<object>required

Aggregate multiple metrics at the same time

filtersarray<object>optional

Get aggregations for metrics with multiple filters, value should be an exact match

timeframeobjectrequired

The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.

workspace_idstringrequired

The unique identifier of the Gumlet workspace ID available on the Video Workspaces.

6 status codes
200Returns aggregated metric results, including aggregation values such as sums.
viewsobjectoptional
400Returned when the request is invalid, such as when required fields, valid dates, or supported metric and aggregation values are not supplied.

One documented failure

  • parameter_missing

    One or more required values are missing.

errorobjectrequired
401Returned when the request is unauthorized.

One documented failure

  • invalid_property_id

    You don't have access to that property, please select a property id

errorobjectoptional
403Returned for an unpaid account or insufficient role permissions.

One documented failure

  • unauthorized

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

errorobjectrequired
404Returned when a requested resource is not found.

One documented failure

  • property_not_found

    Could not find any video insight property with the specified property_id.

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. A 401 indicates an unauthorized request. A 403 is returned for an unpaid account or insufficient role permissions. A 404 indicates that a requested resource was not found. A 500 indicates an internal server error. The body must include aggregate, workspace_id, and timeframe; each aggregate entry must specify a supported metric and an aggregation function of sum or average, and the timeframe must use yyyy-MM-dd dates and span no more than 60 days.