GET
/
data
/
views
/
query
curl --request GET \
  --url https://livepeer.studio/api/data/views/query \
  --header 'Authorization: <api-key>'
[
  {
    "playbackId": "<string>",
    "creatorId": "<string>",
    "viewerId": "<string>",
    "dStorageUrl": "<string>",
    "timestamp": 1587667174725,
    "device": "<string>",
    "deviceType": "<string>",
    "cpu": "<string>",
    "os": "<string>",
    "browser": "<string>",
    "browserEngine": "<string>",
    "continent": "<string>",
    "country": "<string>",
    "subdivision": "<string>",
    "timezone": "<string>",
    "geohas": "<string>",
    "viewCount": 123,
    "playtimeMins": 123,
    "ttffMs": 123,
    "rebufferRatio": 123,
    "errorRate": 123,
    "exitsBeforeStart": 123
  }
]

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

playbackId
string

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

from

Start timestamp for the query range (inclusive)

to

End timestamp for the query range (exclusive)

timeStep
enum<string>

The time step to aggregate viewership metrics by

Available options:
hour,
day,
week,
month,
year
assetId
string

The asset ID to filter metrics for

streamId
string

The stream ID to filter metrics for

creatorId
string

The creator ID to filter the query results

breakdownBy[]
enum<string>[]

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

Available options:
playbackId,
deviceType,
device,
cpu,
os,
browser,
browserEngine,
continent,
country,
subdivision,
timezone,
geohash,
viewerId,
creatorId

Response

200 - application/json
playbackId
string

The playback ID associated with the metric.

creatorId
string

The ID of the creator associated with the metric.

viewerId
string

The ID of the viewer associated with the metric.

dStorageUrl
string

The URL of the distributed storage used for the asset

timestamp
number

Timestamp (in milliseconds) when the metric was recorded. If the query contains a time step, this timestamp will point to the beginning of the time step period.

device
string

The device used by the viewer.

deviceType
string

The type of the device used by the viewer.

cpu
string

The CPU used by the viewer's device.

os
string

The operating system used by the viewer.

browser
string

The browser used by the viewer.

browserEngine
string

The browser engine used by the viewer's browser.

continent
string

The continent where the viewer is located.

country
string

The country where the viewer is located.

subdivision
string

The subdivision (e.g., state or province) where the viewer is located.

timezone
string

The timezone where the viewer is located.

geohas
string

Geographic encoding of the viewers location. Accurate to 3 digits.

viewCount
integer
required

The number of views for the asset.

playtimeMins
number
required

The total playtime in minutes for the asset.

ttffMs
number

The time-to-first-frame (TTFF) in milliseconds.

rebufferRatio
number

The rebuffering ratio for the asset.

errorRate
number

The error rate for the asset.

exitsBeforeStart
number

The percentage of sessions that existed before the asset started playing.