Skip to main contentIBM Video Streaming Developers

Peak viewer numbers

Live and recorded peak concurrent viewership of all content for a given time period

Gives the number of peak concurrent viewers across live or on demand content for a specific timeframe.

GET https://analytics-api.video.ibm.com/v1/peak-viewer-numbers

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCE DESCRIPTION
granularitystringOPTIONALhour, minute day, month, the default value is minute
date_time_fromstringREQUIREDStart date and time for a period in ISO8601 format
date_time_tostringREQUIREDEnd date and time for a period in ISO8601 format
_pageintegerOPTIONALRequested page number (value is 1 by default)
_limitintegerOPTIONALRequested page size (value is 10 by default, max. 10 000)

Success response

Upon success a response with HTTP status “200 OK” is returned with an array under a data key. The elements of the array contain every data point wrapped in a PeakSeries object matching the query parameters. Each object has the following attributes under the attributes key:

KEYTYPEDESCRIPTION
content_typestringType of the content, either live or recorded
content_idintegerLive or recorded ID
timestringDate and time for the datapoint in ISO8601 format
valueintegerNumber of peak viewers

Example of a success response:

{
"data": [
{
"attributes": {
"content_type": "live",
"content_id": 238589,
"time": "2020-07-16T00:00:00+01:00",
"value": 11
},

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR CONDITIONS
400 Bad RequestValidation of the parameters has failed, the response contains a detailed explanation
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not FoundResource was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Live or recorded peak concurrent viewer number of all or given content ids for a given time period

Gives the number of peak concurrent viewers across live or on demand content for a specific timeframe or limits this to just one content, either live or on demand, based on the ID of the channel or recorded video.

GET https://analytics-api.video.ibm.com/v1/peak-viewer-numbers/{content_type}

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCE DESCRIPTION
content_typestringREQUIREDType of the content, either live or recorded
granularitystringOPTIONALhour, minute day, month, the default value is minute
date_time_fromstringREQUIREDStart date and time for a period in ISO8601 format
date_time_tostringREQUIREDEnd date and time for a period in ISO8601 format
content_idstringOPTIONALA list of comma separated IDs
_pageintegerOPTIONALRequested page number (value is 1 by default)
_limitintegerOPTIONALRequested page size (value is 10 by default, max. 10 000)

Success response

Upon success a response with HTTP status “200 OK” is returned with an array under a data key. The elements of the array contain every data point wrapped in a PeakSeries object matching the query parameters. Each object has the following attributes under the attributes key:

KEYTYPEDESCRIPTION
content_typestringType of the content, either live or recorded
content_idintegerLive or recorded ID
timestringDate and time for the datapoint in ISO8601 format
valueintegerNumber of peak viewers

Example of a success response:

{
"data": [
{
"attributes": {
"content_type": "live",
"content_id": 238589,
"time": "2020-07-16T00:00:00+01:00",
"value": 11
},

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR CONDITIONS
400 Bad RequestValidation of the parameters has failed, the response contains a detailed explanation
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not FoundResource was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Recorded peak viewership of all content on the defined channels for a given time period

Gives the number of peak concurrent viewers for on demand content for a specific timeframe on the defined channels.

GET https://analytics-api.video.ibm.com/v1/peak-viewer-numbers/{content_type}

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCE DESCRIPTION
channel_idintegerREQUIREDA list of comma separated IDs
granularitystringOPTIONALhour, minute day, month, the default value is minute
date_time_fromstringREQUIREDStart date and time for a period in ISO8601 format
date_time_tostringREQUIREDEnd date and time for a period in ISO8601 format
_pageintegerOPTIONALRequested page number (value is 1 by default)
_limitintegerOPTIONALRequested page size (value is 10 by default, max. 10 000)

Success response

Upon success a response with HTTP status “200 OK” is returned with an array under a data key. The elements of the array contain every data point wrapped in a PeakSeries object matching the query parameters. Each object has the following attributes under the attributes key:

KEYTYPEDESCRIPTION
content_typestringType of the content, for this endpoint recorded only
content_idintegerVideo ID
timestringDate and time for the datapoint in ISO8601 format
valueintegerNumber of peak viewers

Example of a success response:

{
"data": [
{
"attributes": {
"content_type": "recorded",
"content_id": 238589,
"time": "2020-07-16T00:00:00+01:00",
"value": 11
},

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR CONDITIONS
400 Bad RequestValidation of the parameters has failed, the response contains a detailed explanation
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not FoundResource was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Live or recorded peak viewership summary on content for a given time period

Gives the highest number of peak concurrent viewers and the time of occurence for the content in the given time period.

GET https://analytics-api.video.ibm.com/v1/peak-viewer-numbers/{content_type}/summary

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCE DESCRIPTION
content_idintegerREQUIREDSingle content id
date_time_fromstringREQUIREDStart date and time for a period in ISO8601 format
date_time_tostringREQUIREDEnd date and time for a period in ISO8601 format

Success response

Upon success a response with HTTP status “200 OK” is returned with a zero or one length array under a data key. The element of the array contains a data point wrapped in a PeakSeries object matching the query parameters. It has the following attributes under the attributes key:

KEYTYPEDESCRIPTION
content_typestringType of the content, for this endpoint recorded only
media_idintegerVideo ID
timestampstringDate and time for the datapoint in ISO8601 format
valueintegerNumber of peak viewers

Example of a success response:

{
"data": [
{
"attributes": {
"content_type": "recorded",
"content_id": 238589,
"time": "2020-07-16T00:00:00+01:00",
"value": 11
},

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR CONDITIONS
400 Bad RequestValidation of the parameters has failed, the response contains a detailed explanation
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not FoundResource was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request