Fetch engagement analytics data for a VOD stream
(Available from version 1.11) This operation returns the engagement data for a specific VOD stream. Engagement data provides insight into how many plays your stream received and for how long.
If you don't send from and to query parameters, the last hour's worth of data is returned. See the trend field in the response for information about sample intervals.
If the time range between from and to query parameters is:
<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li> <li>More than 60 minutes, the cache time between responses is 60 seconds.</li>Path parameters
The unique alphanumeric string that identifies the VOD stream.
Query parameters
Use this parameter, along with to, to return historic viewer data.
The start of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the from query parameter without setting the to query parameter, the data returned will reflect 30 days starting at the from date, or data up to to the current day, whichever is shorter.
Example: 2024-04-13T10:31:54.486Z
Use this parameter, along with from, to return historic viewer data.
The end of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 30 days.
Example: 2023-02-14T10:31:54.486Z
Specify the data you want returned in the response. The only valid value for this endpoint is trend.
Valid values are: trend
Example: trend
Response
Success
Example response
{
"vod_stream": {
"id": "tvctq36g",
"play_rate": 0.2,
"completion_rate": 0.42,
"duration_ms": 9761000,
"avg_seconds_watched": 302,
"avg_percentage_watched": 67,
"total_seconds_watched": 77699,
"trend": [
{
"percent": 1,
"viewers": 7
},
{
"percent": 2,
"viewers": 7
},
{
"percent": 3,
"viewers": 7
},
{
"percent": 4,
"viewers": 7
},
{
"percent": 5,
"viewers": 10
},
{
"percent": 6,
"viewers": 7
},
{
"percent": 7,
"viewers": 7
},
{
"percent": 8,
"viewers": 25
},
{
"percent": 9,
"viewers": 25
},
{
"percent": 10,
"viewers": 25
},
{
"percent": 11,
"viewers": 7
},
{
"spercent": 12,
"viewers": 7
},
{
"percent": 13,
"viewers": 7
}
]
},
"limits": {
"from": "2024-03-14T10:31:54.000Z",
"to": "2024-04-13T10:31:54.000Z"
}
}