metrics
Query viewership metrics
Requires a private (non-CORS) API key to be used.
get/data/views/query
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
Start timestamp for the query range (inclusive)
End timestamp for the query range (exclusive)
timeStep'hour' | 'day' | 'week' | 'month' | 'year'
The time step to aggregate viewership metrics by
assetIdstring
The asset ID to filter metrics for
streamIdstring
The stream ID to filter metrics for
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
Example response
[
{
"playbackId": "1bde4o2i6xycudoy",
"creatorId": "john@doe.com",
"viewerId": "1bde4o2i6xycudoy",
"dStorageUrl": "ipfs://QmZ4",
"timestamp": 1587667174725,
"device": "iPhone",
"deviceType": "mobile",
"cpu": "ARM",
"os": "iOS",
"browser": "Safari",
"browserEngine": "WebKit",
"continent": "North America",
"country": "United States",
"subdivision": "California",
"timezone": "America/Los_Angeles",
"viewCount": 100,
"playtimeMins": 10,
"ttffMs": 100,
"rebufferRatio": 0.1,
"errorRate": 0.1,
"exitsBeforeStart": 0.5
}
]