POST/video/live/analytics

Get live stream usage analytics

Retrieves usage analytics for live streams over a specified date range. Provide date_range, group_by, and metrics to select the reporting period, time grouping, and usage measures. The response returns data points for the requested metrics and the unit used for storage data.

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

3 body fields

Live stream usage analytics query. Include the date range, grouping interval, and metrics to retrieve.

date_rangeobjectrequired

The reporting period, with start_at and end_at dates in yyyy-MM-dd format.

group_bystringrequired

Group the data either weekly, daily or monthly

Allowed:dailyweeklymonthly
metricsarray<string>required

List of metrics required in response

5 status codes
200Returns data arrays for the requested usage metrics, with timestamp and unit values, and a storage_data_unit value of min or gb.
asset_durationarray<object>optional

Data about input seconds processed

bandwidth_consumptionarray<object>optional

Data about bandwidth consumption

storage_data_unitstringrequired

Storage data unit information

Allowed:mingb
storage_unitarray<object>optional

Bytes or seconds of storage used

400Returned when the request is invalid.

One documented failure

  • invalid_parameter_value

    The parameter value is invalid.

errorobjectrequired
401Returned when the request omits or supplies an invalid API key or bearer token.

One documented failure

  • invalid_api_key

    API key supplied with request is invalid

errorobjectrequired
403Returned when the account is unpaid or the authenticated user has insufficient role permissions.

One documented failure

  • unauthorized

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

errorobjectrequired
404Returned when the requested live stream analytics data is not found.

One documented failure

  • source_not_found

    Could not find any video source with the specified source_id.

errorobjectrequired

Error handling

A 400 is returned when the request is invalid. A 401 is returned when the request omits or supplies an invalid API key or bearer token. A 403 is returned for an unpaid account or insufficient role permissions, and a 404 is returned when the requested analytics data is not found. Include date_range, group_by, and metrics; date_range must contain start_at and end_at in yyyy-MM-dd format, group_by must be daily, weekly, or monthly, and each metric must be bandwidth_consumption, asset_duration, or storage_unit.