v50

latestOpenAPI 3.1.0raw.githubusercontent.com2024-10-175745153.1 KB
metrics

Query realtime viewership

Requires a private (non-CORS) API key to be used.

get/data/views/now

Query parameters

playbackIdstring

The playback ID to filter the query results. This can be a canonical playback ID from Livepeer assets or streams, or dStorage identifiers for assets

creatorIdstring

The creator ID to filter the query results

breakdownBy[]string[]

The list of fields to break down the query results. Specify this query-string multiple times to break down by multiple fields.

Response

A list of Metric objects

playbackIdstring

The playback ID associated with the metric.

devicestring

The device used by the viewer.

browserstring

The browser used by the viewer.

countrystring

The country where the viewer is located.

viewCountinteger required

The number of views for the stream/asset.

errorRatenumber required

The error rate for the stream/asset.

Example response

[
  {
    "playbackId": "1bde4o2i6xycudoy",
    "device": "iPhone",
    "browser": "Safari",
    "country": "United States",
    "viewCount": 100,
    "errorRate": 0.1
  }
]