# 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: Less than 60 minutes, the cache time between responses is 10 seconds. More than 60 minutes, the cache time between responses is 60 seconds. Endpoint: GET /analytics/engagement/vod_streams/{id} Version: v2.0 ## Path parameters: - `id` (string, required) The unique alphanumeric string that identifies the VOD stream. ## Query parameters: - `from` (string) 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: 2023-01-14T10:31:54.486Z - `to` (string) 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 - `include` (string) 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 200 fields (application/json): - `vod_stream` (object) Example: {"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}]} - `vod_stream.id` (string) The unique alphanumeric string that identifies the VOD stream. Example: "tvctq36g" - `vod_stream.play_rate` (integer) The ratio between displays and plays. For example, 100 displays and 20 plays will result in 0.20 which means that 20% of the displays resulted in a play. Example: 0.2 - `vod_stream.completion_rate` (integer) The ratio of viewers that watched the last segment of the asset. It is represented in a decimal value. Example: 0.42 - `vod_stream.duration_ms` (integer) The length of the stream in milliseconds. Example: 9761000 - `vod_stream.avg_seconds_watched` (integer) The average number of seconds the viewers viewed the stream. Example: 302 - `vod_stream.avg_percentage_watched` (integer) The average time watched represented as a percentage. Example: 67 - `vod_stream.total_seconds_watched` (integer) The total number of seconds the stream was viewed. Example: 77699 - `vod_stream.trend` (object) An array of viewer trend data for an asset in the given time period. Note: Data from the most recent hour data might not be included in the result of a time range that extends beyond the most recent 3 days. Default: Last hour Example: [{"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}] - `vod_stream.trend.percent` (integer) A specific segment of the VOD asset. A VOD asset has 100 segments and each segment represents a completion percentage of the asset. For example, 1 is the data for 0 to 1% of the asset, 2 is the data for 1 to 2% and so on. Trend data is aggregated for each segment. Use _duration_ms / 1000 x percent_ to calculate a timestamp, in seconds, for the trend data. - `vod_stream.trend.viewers` (integer) The total number of unique viewers who watched this specific segment of the VOD asset. A unique viewer is a single IP address; multiple users that share the same IP address are counted once. - `vod_stream.limits` (object) The time frame represented in the response. - `vod_stream.limits.from` (string) The start of the range of time represented in the response. - `vod_stream.limits.to` (string) The end of the range of time represented in the response. ## Response 401 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 403 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 404 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 410 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 422 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array)