# Fetch viewer analytics data for a VOD stream (Available from version 1.11) This operation returns the live and historic viewer data for a specific VOD stream. You'll use the query parameters to return live vs historic data, as well as specific types of viewer data. Querying live data 1. To get data for currently live streams, do not send from and to values. 2. Use the include query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data. If you don't send any query parameters (to, from, or include), the total number of viewers is returned. Querying historic data 1. To get data for streams that ran previously, send from and to values. 2. Use the include query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data. If you don't send include values, the total number of viewers is returned. 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/viewers/vod_streams/{id} Version: v1.11 ## 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 doesn't include minutes and seconds. If you include minutes and seconds, Wowza Video rounds up to the nearest hour when it is more than 30 minutes. If it is less than 30 minutes, Wowza Video rounds it down to the nearest hour. The maximum difference between from and to is 90 days. If you set the from query parameter without setting the to query parameter, the data returned will reflect 90 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 doesn't include minutes and seconds. If you include minutes and seconds, Wowza Video rounds up to the nearest hour when it is more than 30 minutes. If it is less than 30 minutes, Wowza Video rounds it down to the nearest hour. The maximum difference between from and to is 90 days. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 90 days or from your last invoice date, whichever is shorter. Example: 2023-02-14T10:31:54.486Z - `include` (string) Specify the data you want returned in the response. You can send a comma-separated list of values. Valid values are: countries, renditions, devices, and trend. Example: countries,trend ## Response 200 fields (application/json): - `vod_stream` (object) Example: {"id":"tvctq36g","viewers":7,"countries":[{"code":"US","viewers":3},{"code":"DE","viewers":4}],"renditions":[{"name":720,"viewers":7}],"devices":[{"name":"Desktop","viewers":7}],"trend":[{"sampled_at":"2023-05-26T12:01:00Z","viewers":7},{"sampled_at":"2023-05-26T12:02:00Z","viewers":7},{"sampled_at":"2023-05-26T12:03:00Z","viewers":7},{"sampled_at":"2023-05-26T12:04:00Z","viewers":7},{"sampled_at":"2023-05-26T12:05:00Z","viewers":7},{"sampled_at":"2023-05-26T12:06:00Z","viewers":7},{"sampled_at":"2023-05-26T12:07:00Z","viewers":7},{"sampled_at":"2023-05-26T12:08:00Z","viewers":7},{"sampled_at":"2023-05-26T12:09:00Z","viewers":7},{"sampled_at":"2023-05-26T12:10:00Z","viewers":7},{"sampled_at":"2023-05-26T12:11:00Z","viewers":7},{"sampled_at":"2023-05-26T12:12:00Z","viewers":7},{"sampled_at":"2023-05-26T12:13:00Z","viewers":7},{"sampled_at":"2023-05-26T12:14:00Z","viewers":7},{"sampled_at":"2023-05-26T12:15:00Z","viewers":7},{"sampled_at":"2023-05-26T12:16:00Z","viewers":7},{"sampled_at":"2023-05-26T12:17:00Z","viewers":7},{"sampled_at":"2023-05-26T12:18:00Z","viewers":7},{"sampled_at":"2023-05-26T12:19:00Z","viewers":7},{"sampled_at":"2023-05-26T12:20:00Z","viewers":7},{"sampled_at":"2023-05-26T12:21:00Z","viewers":7},{"sampled_at":"2023-05-26T12:22:00Z","viewers":7},{"sampled_at":"2023-05-26T12:23:00Z","viewers":7},{"sampled_at":"2023-05-26T12:24:00Z","viewers":7},{"sampled_at":"2023-05-26T12:25:00Z","viewers":7},{"sampled_at":"2023-05-26T12:26:00Z","viewers":7},{"sampled_at":"2023-05-26T12:27:00Z","viewers":7},{"sampled_at":"2023-05-26T12:28:00Z","viewers":7},{"sampled_at":"2023-05-26T12:29:00Z","viewers":7},{"sampled_at":"2023-05-26T12:30:00Z","viewers":7},{"sampled_at":"2023-05-26T12:31:00Z","viewers":7},{"sampled_at":"2023-05-26T12:32:00Z","viewers":7},{"sampled_at":"2023-05-26T12:33:00Z","viewers":7},{"sampled_at":"2023-05-26T12:34:00Z","viewers":7},{"sampled_at":"2023-05-26T12:35:00Z","viewers":7},{"sampled_at":"2023-05-26T12:36:00Z","viewers":7},{"sampled_at":"2023-05-26T12:37:00Z","viewers":7},{"sampled_at":"2023-05-26T12:38:00Z","viewers":7},{"sampled_at":"2023-05-26T12:39:00Z","viewers":7},{"sampled_at":"2023-05-26T12:40:00Z","viewers":7},{"sampled_at":"2023-05-26T12:41:00Z","viewers":7},{"sampled_at":"2023-05-26T12:42:00Z","viewers":7},{"sampled_at":"2023-05-26T12:43:00Z","viewers":7},{"sampled_at":"2023-05-26T12:44:00Z","viewers":7},{"sampled_at":"2023-05-26T12:45:00Z","viewers":7},{"sampled_at":"2023-05-26T12:46:00Z","viewers":7},{"sampled_at":"2023-05-26T12:47:00Z","viewers":7},{"sampled_at":"2023-05-26T12:48:00Z","viewers":7},{"sampled_at":"2023-05-26T12:49:00Z","viewers":7},{"sampled_at":"2023-05-26T12:50:00Z","viewers":7},{"sampled_at":"2023-05-26T12:51:00Z","viewers":7},{"sampled_at":"2023-05-26T12:52:00Z","viewers":7},{"sampled_at":"2023-05-26T12:53:00Z","viewers":7},{"sampled_at":"2023-05-26T12:54:00Z","viewers":7},{"sampled_at":"2023-05-26T12:55:00Z","viewers":7},{"sampled_at":"2023-05-26T12:56:00Z","viewers":7},{"sampled_at":"2023-05-26T12:57:00Z","viewers":7},{"sampled_at":"2023-05-26T12:58:00Z","viewers":7},{"sampled_at":"2023-05-26T12:59:00Z","viewers":7},{"sampled_at":"2023-05-26T12:60:00Z","viewers":7}]} - `vod_stream.id` (string) The unique alphanumeric string that identifies the VOD stream. Example: "tvctq36g" - `vod_stream.viewers` (integer) The total number of unique viewers to download at least one chunk of the VOD stream. A unique viewer is a single IP address; multiple users that share the same IP address are counted once. Example: 7 - `vod_stream.countries` (object) An array of viewer countries. Example: [{"code":"US","viewers":3},{"code":"DE","viewers":4}] - `vod_stream.countries.code` (string) A country code where the stream was requested. - `vod_stream.renditions` (object) An array of viewer renditions. Example: [{"name":720,"viewers":7}] - `vod_stream.renditions.name` (integer) The rendition of the stream played. A rendition name is the smaller number of the resolution. The resolution is [width]x[height] in which the stream was played. Renditions names have to be unique. If you've created two renditions that have the same height and width, Wowza Video increments the value of the height and uses that as the rendition name. Example: Two renditions of 1280x720 will result in rendition names of 720 and 721. - `vod_stream.renditions.viewers` (integer) The total number of unique viewers to download at least one chunk of the stream. A unique viewer is a single IP address; multiple users that share the same IP address are counted once. - `vod_stream.devices` (object) An array of viewer devices. Example: [{"name":"Desktop","viewers":7}] - `vod_stream.devices.name` (string) A device where the stream was played. - `vod_stream.trend` (object) An array of viewer trend data. The granularity of sampled data changes based on the from and to query values you use: Requests made for data within the past 30 days, return the following sample intervals: 0 minutes to 3 hours - Samples returned per minute 3 hours, 1 second to 24 hours - Samples returned per hour 24 hours, 1 second to 90 days - Samples returned per day Defaults: from = last billing date, to = end of current day Example: [{"sampled_at":"2023-05-26T12:01:00Z","viewers":7},{"sampled_at":"2023-05-26T12:02:00Z","viewers":7},{"sampled_at":"2023-05-26T12:03:00Z","viewers":7},{"sampled_at":"2023-05-26T12:04:00Z","viewers":7},{"sampled_at":"2023-05-26T12:05:00Z","viewers":7},{"sampled_at":"2023-05-26T12:06:00Z","viewers":7},{"sampled_at":"2023-05-26T12:07:00Z","viewers":7},{"sampled_at":"2023-05-26T12:08:00Z","viewers":7},{"sampled_at":"2023-05-26T12:09:00Z","viewers":7},{"sampled_at":"2023-05-26T12:10:00Z","viewers":7},{"sampled_at":"2023-05-26T12:11:00Z","viewers":7},{"sampled_at":"2023-05-26T12:12:00Z","viewers":7},{"sampled_at":"2023-05-26T12:13:00Z","viewers":7},{"sampled_at":"2023-05-26T12:14:00Z","viewers":7},{"sampled_at":"2023-05-26T12:15:00Z","viewers":7},{"sampled_at":"2023-05-26T12:16:00Z","viewers":7},{"sampled_at":"2023-05-26T12:17:00Z","viewers":7},{"sampled_at":"2023-05-26T12:18:00Z","viewers":7},{"sampled_at":"2023-05-26T12:19:00Z","viewers":7},{"sampled_at":"2023-05-26T12:20:00Z","viewers":7},{"sampled_at":"2023-05-26T12:21:00Z","viewers":7},{"sampled_at":"2023-05-26T12:22:00Z","viewers":7},{"sampled_at":"2023-05-26T12:23:00Z","viewers":7},{"sampled_at":"2023-05-26T12:24:00Z","viewers":7},{"sampled_at":"2023-05-26T12:25:00Z","viewers":7},{"sampled_at":"2023-05-26T12:26:00Z","viewers":7},{"sampled_at":"2023-05-26T12:27:00Z","viewers":7},{"sampled_at":"2023-05-26T12:28:00Z","viewers":7},{"sampled_at":"2023-05-26T12:29:00Z","viewers":7},{"sampled_at":"2023-05-26T12:30:00Z","viewers":7},{"sampled_at":"2023-05-26T12:31:00Z","viewers":7},{"sampled_at":"2023-05-26T12:32:00Z","viewers":7},{"sampled_at":"2023-05-26T12:33:00Z","viewers":7},{"sampled_at":"2023-05-26T12:34:00Z","viewers":7},{"sampled_at":"2023-05-26T12:35:00Z","viewers":7},{"sampled_at":"2023-05-26T12:36:00Z","viewers":7},{"sampled_at":"2023-05-26T12:37:00Z","viewers":7},{"sampled_at":"2023-05-26T12:38:00Z","viewers":7},{"sampled_at":"2023-05-26T12:39:00Z","viewers":7},{"sampled_at":"2023-05-26T12:40:00Z","viewers":7},{"sampled_at":"2023-05-26T12:41:00Z","viewers":7},{"sampled_at":"2023-05-26T12:42:00Z","viewers":7},{"sampled_at":"2023-05-26T12:43:00Z","viewers":7},{"sampled_at":"2023-05-26T12:44:00Z","viewers":7},{"sampled_at":"2023-05-26T12:45:00Z","viewers":7},{"sampled_at":"2023-05-26T12:46:00Z","viewers":7},{"sampled_at":"2023-05-26T12:47:00Z","viewers":7},{"sampled_at":"2023-05-26T12:48:00Z","viewers":7},{"sampled_at":"2023-05-26T12:49:00Z","viewers":7},{"sampled_at":"2023-05-26T12:50:00Z","viewers":7},{"sampled_at":"2023-05-26T12:51:00Z","viewers":7},{"sampled_at":"2023-05-26T12:52:00Z","viewers":7},{"sampled_at":"2023-05-26T12:53:00Z","viewers":7},{"sampled_at":"2023-05-26T12:54:00Z","viewers":7},{"sampled_at":"2023-05-26T12:55:00Z","viewers":7},{"sampled_at":"2023-05-26T12:56:00Z","viewers":7},{"sampled_at":"2023-05-26T12:57:00Z","viewers":7},{"sampled_at":"2023-05-26T12:58:00Z","viewers":7},{"sampled_at":"2023-05-26T12:59:00Z","viewers":7},{"sampled_at":"2023-05-26T12:60:00Z","viewers":7}] - `vod_stream.trend.sampled_at` (string) The date and time the trend data was sampled. - `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)