openapi: 3.0.3
info:
title: Wowza Streaming Engine REST advanced_token_authentication analytics_viewers API
description: Complete REST API for Wowza Streaming Engine. Auto-converted from Swagger 1.2 (http://localhost:8089/swagger.json) to OpenAPI 3.0.3 for public documentation.
version: 2.0.0
contact:
name: Wowza Media Systems
url: https://www.wowza.com/docs/wowza-streaming-engine-rest-api
license:
name: Wowza Media Systems
url: https://www.wowza.com
servers:
- url: http://localhost:8087
description: Wowza Streaming Engine Server
security:
- basicAuth: []
tags:
- name: analytics_viewers
description: Operations related to viewer analytics.
x-displayName: Viewers
paths:
/analytics/viewers/account:
get:
summary: Fetch viewer analytics data for an account
description: "(Available from version 1.11) This operation returns live and historic viewer data for the account related to the JSON web token used for API authentication. You'll use the query parameters to return live vs historic data, as well as specific types of viewer data. \n\n**Querying live data**\n\n1. To get data for currently live streams, do not send **from** and **to** values.\n2. Use the **include** query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data.\n\nIf you don't send any query parameters (to, from, or include), the total number of viewers is returned.\n\n**Querying historic data**\n1. To get data for streams that ran previously, send **from** and **to** values.\n2. Use the **include** query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data. \n\nIf you don't send **include** values, the total number of viewers is returned.\n\nIf the time range between **from** and **to** query parameters is:\n\n<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li>\n<li>More than 60 minutes, the cache time between responses is 60 seconds.</li>"
operationId: analyticsAccountViewers
tags:
- analytics_viewers
x-codeSamples:
- lang: Shell
source: "// Using cURL\ncurl -H \"Authorization: Bearer ${WV_JWT}\" \\\n \n -H \"Content-Type: application/json\" \\\n -X \"GET\" \\\n \"${WV_HOST}/api/v2.0/analytics/viewers/account?from=2024-03-14T10:31:54.486Z&to=2024-04-13T10:31:54.486Z&include=countries,renditions,devices\"\n"
- lang: JavaScript
source: "// Using Node.js\nconst https = require('https');\nconst crypto = require('crypto');\nvar hostname = 'api.video.wowza.com'\nvar path = '/api/v2.0/analytics/viewers/account?from=2024-03-14T10:31:54.486Z&to=2024-04-13T10:31:54.486Z&include=countries,renditions,devices';\n//For security, never reveal API token in client-side code\nvar wvJWT = 'Bearer [your JWT]';\n\nconst options = {\n hostname: hostname,\n path: path,\n headers: {\n 'Authorization': wvJWT,\n 'Content-Type': 'application/json'\n }\n};\nhttps.get(options, function(res) {\n var body = '';\n res.on('data', function(data){\n body += data;\n });\n res.on('end', function() {\n console.log(JSON.parse(body));\n });\n}).on('error', function(e) {\n console.log(e.message);\n});\n"
parameters:
- name: from
in: query
required: false
description: "Use this parameter, along with **to**, to return historic viewer data. \n\nThe 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.\n\nExample:\n**2024-03-14T10:31:54.486Z**"
schema:
type: string
format: date-time
- name: to
in: query
required: false
description: "Use this parameter, along with **from**, to return historic viewer data. \n\n\nThe 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 or from your last invoice date, whichever is shorter.\n\nExample:\n**2024-04-13T10:31:54.486Z**"
schema:
type: string
format: date-time
- name: include
in: query
required: false
description: '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**'
schema:
type: string
- name: time_zone
in: query
required: false
schema:
type: string
description: "Specify the time zone you want the returned data to reflect. \n\n<details> <summary>Click to expand for the full list of valid values</summary>\n\n\n | Locations | Wowza Video time_zone value |\n |---|---|\n | International Date Line West | Etc/GMT+12 |\n | Midway Island | Pacific/Midway |\n | American Samoa | Pacific/Pago_Pago |\n | Hawaii | Pacific/Honolulu |\n | Alaska | America/Juneau |\n | Pacific Time (US & Canada) | America/Los_Angeles |\n | Tijuana | America/Tijuana |\n | Mountain Time (US & Canada) | America/Denver |\n | Arizona | America/Phoenix |\n | Chihuahua | America/Chihuahua |\n | Mazatlan | America/Mazatlan |\n | Central Time (US & Canada) | America/Chicago |\n | Saskatchewan | America/Regina |\n | Guadalajara | America/Mexico_City |\n | Mexico City | America/Mexico_City |\n | Monterrey | America/Monterrey |\n | Central America | America/Guatemala |\n | Eastern Time (US & Canada) | America/New_York |\n | Indiana (East) | America/Indiana/Indianapolis |\n | Bogota | America/Bogota |\n | Lima | America/Lima |\n | Quito | America/Lima |\n | Atlantic Time (Canada) | America/Halifax |\n | Caracas | America/Caracas |\n | La Paz | America/La_Paz |\n | Santiago | America/Santiago |\n | Newfoundland | America/St_Johns |\n | Brasilia | America/Sao_Paulo |\n | Buenos Aires | America/Argentina/Buenos_Aires |\n | Montevideo | America/Montevideo |\n | Georgetown | America/Guyana |\n | Puerto Rico | America/Puerto_Rico |\n | Greenland | America/Godthab |\n | Mid-Atlantic | Atlantic/South_Georgia |\n | Azores | Atlantic/Azores |\n | Cape Verde Is. | Atlantic/Cape_Verde |\n | Dublin | Europe/Dublin |\n | Edinburgh | Europe/London |\n | Lisbon | Europe/Lisbon |\n | London | Europe/London |\n | Casablanca | Africa/Casablanca |\n | Monrovia | Africa/Monrovia |\n | UTC | Etc/UTC |\n | Belgrade | Europe/Belgrade |\n | Bratislava | Europe/Bratislava |\n | Budapest | Europe/Budapest |\n | Ljubljana | Europe/Ljubljana |\n | Prague | Europe/Prague |\n | Sarajevo | Europe/Sarajevo |\n | Skopje | Europe/Skopje |\n | Warsaw | Europe/Warsaw |\n | Zagreb | Europe/Zagreb |\n | Brussels | Europe/Brussels |\n | Copenhagen | Europe/Copenhagen |\n | Madrid | Europe/Madrid |\n | Paris | Europe/Paris |\n | Amsterdam | Europe/Amsterdam |\n | Berlin | Europe/Berlin |\n | Bern | Europe/Zurich |\n | Zurich | Europe/Zurich |\n | Rome | Europe/Rome |\n | Stockholm | Europe/Stockholm |\n | Vienna | Europe/Vienna |\n | West Central Africa | Africa/Algiers |\n | Bucharest | Europe/Bucharest |\n | Cairo | Africa/Cairo |\n | Helsinki | Europe/Helsinki |\n | Kyiv | Europe/Kiev |\n | Riga | Europe/Riga |\n | Sofia | Europe/Sofia |\n | Tallinn | Europe/Tallinn |\n | Vilnius | Europe/Vilnius |\n | Athens | Europe/Athens |\n | Istanbul | Europe/Istanbul |\n | Minsk | Europe/Minsk |\n | Jerusalem | Asia/Jerusalem |\n | Harare | Africa/Harare |\n | Pretoria | Africa/Johannesburg |\n | Kaliningrad | Europe/Kaliningrad |\n | Moscow | Europe/Moscow |\n | St. Petersburg | Europe/Moscow |\n | Volgograd | Europe/Volgograd |\n | Samara | Europe/Samara |\n | Kuwait | Asia/Kuwait |\n | Riyadh | Asia/Riyadh |\n | Nairobi | Africa/Nairobi |\n | Baghdad | Asia/Baghdad |\n | Tehran | Asia/Tehran |\n | Abu Dhabi | Asia/Muscat |\n | Muscat | Asia/Muscat |\n | Baku | Asia/Baku |\n | Tbilisi | Asia/Tbilisi |\n | Yerevan | Asia/Yerevan |\n | Kabul | Asia/Kabul |\n | Ekaterinburg | Asia/Yekaterinburg |\n | Islamabad | Asia/Karachi |\n | Karachi | Asia/Karachi |\n | Tashkent | Asia/Tashkent |\n | Chennai | Asia/Kolkata |\n | Kolkata | Asia/Kolkata |\n | Mumbai | Asia/Kolkata |\n | New Delhi | Asia/Kolkata |\n | Kathmandu | Asia/Kathmandu |\n | Astana | Asia/Dhaka |\n | Dhaka | Asia/Dhaka |\n | Sri Jayawardenepura | Asia/Colombo |\n | Almaty | Asia/Almaty |\n | Novosibirsk | Asia/Novosibirsk |\n | Rangoon | Asia/Rangoon |\n | Bangkok | Asia/Bangkok |\n | Hanoi | Asia/Bangkok |\n | Jakarta | Asia/Jakarta |\n | Krasnoyarsk | Asia/Krasnoyarsk |\n | Beijing | Asia/Shanghai |\n | Chongqing | Asia/Chongqing |\n | Hong Kong | Asia/Hong_Kong |\n | Urumqi | Asia/Urumqi |\n | Kuala Lumpur | Asia/Kuala_Lumpur |\n | Singapore | Asia/Singapore |\n | Taipei | Asia/Taipei |\n | Perth | Australia/Perth |\n | Irkutsk | Asia/Irkutsk |\n | Ulaanbaatar | Asia/Ulaanbaatar |\n | Seoul | Asia/Seoul |\n | Osaka | Asia/Tokyo |\n | Sapporo | Asia/Tokyo |\n | Tokyo | Asia/Tokyo |\n | Yakutsk | Asia/Yakutsk |\n | Darwin | Australia/Darwin |\n | Adelaide | Australia/Adelaide |\n | Canberra | Australia/Melbourne |\n | Melbourne | Australia/Melbourne |\n | Sydney | Australia/Sydney |\n | Brisbane | Australia/Brisbane |\n | Hobart | Australia/Hobart |\n | Vladivostok | Asia/Vladivostok |\n | Guam | Pacific/Guam |\n | Port Moresby | Pacific/Port_Moresby |\n | Magadan | Asia/Magadan |\n | Srednekolymsk | Asia/Srednekolymsk |\n | Solomon Is. | Pacific/Guadalcanal |\n | New Caledonia | Pacific/Noumea |\n | Fiji | Pacific/Fiji |\n | Kamchatka | Asia/Kamchatka |\n | Marshall Is. | Pacific/Majuro |\n | Auckland | Pacific/Auckland |\n | Wellington | Pacific/Auckland |\n | Nuku'alofa | Pacific/Tongatapu |\n | Tokelau Is. | Pacific/Fakaofo |\n | Chatham Is. | Pacific/Chatham |\n | Samoa | Pacific/Apia |\n\n</details>\n\n**Default:** `Etc/UTC`\n\n**Example:** `America/New_York`"
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/analytics_viewers_account'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error404'
'410':
description: Gone
content:
application/json:
schema:
$ref: '#/components/schemas/Error410'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error422'
/analytics/viewers/live_streams/{id}:
get:
summary: Fetch viewer analytics data for a live stream
description: "(Available from version 1.11) This operation returns the live and historic viewer data for a specific live stream. You'll use the query parameters to return live vs historic data, as well as specific types of viewer data.\n\n**Querying live data**\n\n1. To get data for currently live streams, do not send **from** and **to** values.\n2. Use the **include** query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data. \n\nIf you don't send any query parameters (to, from, or include), the total number of viewers is returned.\n\n**Querying historic data**\n1. To get data for streams that ran previously, send **from** and **to** values.\n2. Use the **include** query parameter to specify what data you want to return, including: countries, renditions, devices, and trend data. \n\nIf you don't send **include** values, the total number of viewers is returned.\n\nIf the time range between **from** and **to** query parameters is:\n\n<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li>\n<li>More than 60 minutes, the cache time between responses is 60 seconds.</li>"
operationId: analyticLivestreamViewers
tags:
- analytics_viewers
x-codeSamples:
- lang: Shell
source: "// Using cURL\ncurl -H \"Authorization: Bearer ${WV_JWT}\" \\\n \n -H \"Content-Type: application/json\" \\\n -X \"GET\" \\\n \"${WV_HOST}/api/v2.0/analytics/viewers/live_streams/tvctq36g?from=2024-03-14T10:31:54.486Z&to=2024-04-13T10:31:54.486Z&include=countries,renditions,devices\"\n"
- lang: JavaScript
source: "// Using Node.js\nconst https = require('https');\nconst crypto = require('crypto');\nvar hostname = 'api.video.wowza.com'\nvar path = '/api/v2.0/analytics/viewers/live_streams/tvctq36g?from=2024-03-14T10:31:54.486Z&to=2024-04-13T10:31:54.486Z&include=countries,renditions,devices';\n//For security, never reveal API token in client-side code\nvar wvJWT = 'Bearer [your JWT]';\n\nconst options = {\n hostname: hostname,\n path: path,\n headers: {\n 'Authorization': wvJWT,\n 'Content-Type': 'application/json'\n }\n};\nhttps.get(options, function(res) {\n var body = '';\n res.on('data', function(data){\n body += data;\n });\n res.on('end', function() {\n console.log(JSON.parse(body));\n });\n}).on('error', function(e) {\n console.log(e.message);\n});\n"
parameters:
- name: id
in: path
required: true
description: The unique alphanumeric string that identifies the live stream.
schema:
type: string
- name: from
in: query
required: false
description: "Use this parameter, along with **to**, to return historic viewer data. \n\nThe 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.\n\nExample:\n**2024-03-14T10:31:54.486Z**"
schema:
type: string
format: date-time
- name: to
in: query
required: false
description: "Use this parameter, along with **from**, to return historic viewer data. \n\n\nThe 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 or from your last invoice date, whichever is shorter.\n\nExample:\n**2024-04-13T10:31:54.486Z**"
schema:
type: string
format: date-time
- name: include
in: query
required: false
description: '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**'
schema:
type: string
- name: time_zone
in: query
required: false
schema:
type: string
description: "Specify the time zone you want the returned data to reflect. \n\n<details> <summary>Click to expand for the full list of valid values</summary>\n\n\n | Locations | Wowza Video time_zone value |\n |---|---|\n | International Date Line West | Etc/GMT+12 |\n | Midway Island | Pacific/Midway |\n | American Samoa | Pacific/Pago_Pago |\n | Hawaii | Pacific/Honolulu |\n | Alaska | America/Juneau |\n | Pacific Time (US & Canada) | America/Los_Angeles |\n | Tijuana | America/Tijuana |\n | Mountain Time (US & Canada) | America/Denver |\n | Arizona | America/Phoenix |\n | Chihuahua | America/Chihuahua |\n | Mazatlan | America/Mazatlan |\n | Central Time (US & Canada) | America/Chicago |\n | Saskatchewan | America/Regina |\n | Guadalajara | America/Mexico_City |\n | Mexico City | America/Mexico_City |\n | Monterrey | America/Monterrey |\n | Central America | America/Guatemala |\n | Eastern Time (US & Canada) | America/New_York |\n | Indiana (East) | America/Indiana/Indianapolis |\n | Bogota | America/Bogota |\n | Lima | America/Lima |\n | Quito | America/Lima |\n | Atlantic Time (Canada) | America/Halifax |\n | Caracas | America/Caracas |\n | La Paz | America/La_Paz |\n | Santiago | America/Santiago |\n | Newfoundland | America/St_Johns |\n | Brasilia | America/Sao_Paulo |\n | Buenos Aires | America/Argentina/Buenos_Aires |\n | Montevideo | America/Montevideo |\n | Georgetown | America/Guyana |\n | Puerto Rico | America/Puerto_Rico |\n | Greenland | America/Godthab |\n | Mid-Atlantic | Atlantic/South_Georgia |\n | Azores | Atlantic/Azores |\n | Cape Verde Is. | Atlantic/Cape_Verde |\n | Dublin | Europe/Dublin |\n | Edinburgh | Europe/London |\n | Lisbon | Europe/Lisbon |\n | London | Europe/London |\n | Casablanca | Africa/Casablanca |\n | Monrovia | Africa/Monrovia |\n | UTC | Etc/UTC |\n | Belgrade | Europe/Belgrade |\n | Bratislava | Europe/Bratislava |\n | Budapest | Europe/Budapest |\n | Ljubljana | Europe/Ljubljana |\n | Prague | Europe/Prague |\n | Sarajevo | Europe/Sarajevo |\n | Skopje | Europe/Skopje |\n | Warsaw | Europe/Warsaw |\n | Zagreb | Europe/Zagreb |\n | Brussels | Europe/Brussels |\n | Copenhagen | Europe/Copenhagen |\n | Madrid | Europe/Madrid |\n | Paris | Europe/Paris |\n | Amsterdam | Europe/Amsterdam |\n | Berlin | Europe/Berlin |\n | Bern | Europe/Zurich |\n | Zurich | Europe/Zurich |\n | Rome | Europe/Rome |\n | Stockholm | Europe/Stockholm |\n | Vienna | Europe/Vienna |\n | West Central Africa | Africa/Algiers |\n | Bucharest | Europe/Bucharest |\n | Cairo | Africa/Cairo |\n | Helsinki | Europe/Helsinki |\n | Kyiv | Europe/Kiev |\n | Riga | Europe/Riga |\n | Sofia | Europe/Sofia |\n | Tallinn | Europe/Tallinn |\n | Vilnius | Europe/Vilnius |\n | Athens | Europe/Athens |\n | Istanbul | Europe/Istanbul |\n | Minsk | Europe/Minsk |\n | Jerusalem | Asia/Jerusalem |\n | Harare | Africa/Harare |\n | Pretoria | Africa/Johannesburg |\n | Kaliningrad | Europe/Kaliningrad |\n | Moscow | Europe/Moscow |\n | St. Petersburg | Europe/Moscow |\n | Volgograd | Europe/Volgograd |\n | Samara | Europe/Samara |\n | Kuwait | Asia/Kuwait |\n | Riyadh | Asia/Riyadh |\n | Nairobi | Africa/Nairobi |\n | Baghdad | Asia/Baghdad |\n | Tehran | Asia/Tehran |\n | Abu Dhabi | Asia/Muscat |\n | Muscat | Asia/Muscat |\n | Baku | Asia/Baku |\n | Tbilisi | Asia/Tbilisi |\n | Yerevan | Asia/Yerevan |\n | Kabul | Asia/Kabul |\n | Ekaterinburg | Asia/Yekaterinburg |\n | Islamabad | Asia/Karachi |\n | Karachi | Asia/Karachi |\n | Tashkent | Asia/Tashkent |\n | Chennai | Asia/Kolkata |\n | Kolkata | Asia/Kolkata |\n | Mumbai | Asia/Kolkata |\n | New Delhi | Asia/Kolkata |\n | Kathmandu | Asia/Kathmandu |\n | Astana | Asia/Dhaka |\n | Dhaka | Asia/Dhaka |\n | Sri Jayawardenepura | Asia/Colombo |\n | Almaty | Asia/Almaty |\n | Novosibirsk | Asia/Novosibirsk |\n | Rangoon | Asia/Rangoon |\n | Bangkok | Asia/Bangkok |\n | Hanoi | Asia/Bangkok |\n | Jakarta | Asia/Jakarta |\n | Krasnoyarsk | Asia/Krasnoyarsk |\n | Beijing | Asia/Shanghai |\n | Chongqing | Asia/Chongqing |\n | Hong Kong | Asia/Hong_Kong |\n | Urumqi | Asia/Urumqi |\n | Kuala Lumpur | Asia/Kuala_Lumpur |\n | Singapore | Asia/Singapore |\n | Taipei | Asia/Taipei |\n | Perth | Australia/Perth |\n | Irkutsk | Asia/Irkutsk |\n | Ulaanbaatar | Asia/Ulaanbaatar |\n | Seoul | Asia/Seoul |\n | Osaka | Asia/Tokyo |\n | Sapporo | Asia/Tokyo |\n | Tokyo | Asia/Tokyo |\n | Yakutsk | Asia/Yakutsk |\n | Darwin | Australia/Darwin |\n | Adelaide | Australia/Adelaide |\n | Canberra | Australia/Melbourne |\n | Melbourne | Australia/Melbourne |\n | Sydney | Australia/Sydney |\n | Brisbane | Australia/Brisbane |\n | Hobart | Australia/Hobart |\n | Vladivostok | Asia/Vladivostok |\n | Guam | Pacific/Guam |\n | Port Moresby | Pacific/Port_Moresby |\n | Magadan | Asia/Magadan |\n | Srednekolymsk | Asia/Srednekolymsk |\n | Solomon Is. | Pacific/Guadalcanal |\n | New Caledonia | Pacific/Noumea |\n | Fiji | Pacific/Fiji |\n | Kamchatka | Asia/Kamchatka |\n | Marshall Is. | Pacific/Majuro |\n | Auckland | Pacific/Auckland |\n | Wellington | Pacific/Auckland |\n | Nuku'alofa | Pacific/Tongatapu |\n | Tokelau Is. | Pacific/Fakaofo |\n | Chatham Is. | Pacific/Chatham |\n | Samoa | Pacific/Apia |\n\n</details>\n\n**Default:** `Etc/UTC`\n\n**Example:** `America/New_York`"
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/analytics_viewers_live_stream'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error401'
'403':
description: Forbid
# --- truncated at 32 KB (180 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wowza/refs/heads/main/openapi/wowza-analytics-viewers-api-openapi.yml