Viewer seconds
Live and recorded viewer consumption of all content for a given time period by seconds
Gives the total amount of time that all viewers spent watching live or on demand content within a given time period in an interval of seconds.
GET https://analytics-api.video.ibm.com/v1/viewer-seconds
Parameters
The query parameters for the GET request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
granularity | string | OPTIONAL | hour , minute day , month , the default value is minute |
date_time_from | string | REQUIRED | Start date and time for a period in ISO8601 format |
date_time_to | string | REQUIRED | End date and time for a period in ISO8601 format |
content_id | string | OPTIONAL | A list of comma separated IDs |
_page | integer | OPTIONAL | Requested page number (value is 1 by default) |
_limit | integer | OPTIONAL | Requested 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 ViewerSecondSeries
object
matching the query parameters. Each object has the following attributes under the attributes
key:
KEY | TYPE | DESCRIPTION |
---|---|---|
content_type | string | Type of the content, either live or recorded |
content_id | integer | Live or recorded id |
time | string | Date and time for the datapoint in ISO8601 format |
value | integer | Number 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 CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | Validation of the parameters has failed, the response contains a detailed explanation |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
404 Not Found | Resource was not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Live or recorded viewer consumption of all or given content IDs for a given time period in seconds
Gives the total amount of time that all viewers spent watching all live and on demand content or limits this to just specific content by ID. The figure is limited toa given time period and is reported in an interval of seconds.
GET https://analytics-api.video.ibm.com/v1/viewer-seconds/{content_type}
Parameters
The query parameters for the GET request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
content_type | string | REQUIRED | Type of the content, either live or recorded |
granularity | string | OPTIONAL | hour , minute day , month , the default value is minute |
date_time_from | string | REQUIRED | Start date and time for a period in ISO8601 format |
date_time_to | string | REQUIRED | End date and time for a period in ISO8601 format |
content_id | string | OPTIONAL | A list of comma separated IDs |
_page | integer | OPTIONAL | Requested page number (value is 1 by default) |
_limit | integer | OPTIONAL | Requested 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 ViewerSecondSeries
object
matching the query parameters. Each object has the following attributes under the attributes
key:
KEY | TYPE | DESCRIPTION |
---|---|---|
content_type | string | Type of the content, either live or recorded |
content_id | integer | Live or recorded id |
time | string | Date and time for the datapoint in ISO8601 format |
value | integer | Number 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 CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | Validation of the parameters has failed, the response contains a detailed explanation |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
404 Not Found | Resource was not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Recorded viewer consumption of all content on the defined channels for a given time period in seconds
Gives the total amount of time that all viewers spent watching on demand content on defined channels within a given time period in an interval of seconds.
GET https://analytics-api.video.ibm.com/v1/viewer-seconds/recorded/channel
Parameters
The query parameters for the GET request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
channel_id | integer | REQUIRED | A list of comma separated IDs |
granularity | string | OPTIONAL | hour , minute day , month , the default value is minute |
date_time_from | string | REQUIRED | Start date and time for a period in ISO8601 format |
date_time_to | string | REQUIRED | End date and time for a period in ISO8601 format |
_page | integer | OPTIONAL | Requested page number (value is 1 by default) |
_limit | integer | OPTIONAL | Requested 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 ViewerSecondSeries
object
matching the query parameters. Each object has the following attributes under the attributes
key:
KEY | TYPE | DESCRIPTION |
---|---|---|
content_type | string | Type of the content, for this endpoint recorded only |
content_id | integer | Video id |
time | string | Date and time for the datapoint in ISO8601 format |
value | integer | Number 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 CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | Validation of the parameters has failed, the response contains a detailed explanation |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
404 Not Found | Resource was not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Live or recorded viewer consumption summary for given content ID in time period in seconds
Gives the total amount of time that all viewers spent watching on demand content within a given time period in an interval of seconds.
GET https://analytics-api.video.ibm.com/v1/viewer-seconds/{content_type}/summary
Parameters
The query parameters for the GET request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
content_id | integer | REQUIRED | Single content id |
date_time_from | string | REQUIRED | Start date and time for a period in ISO8601 format |
date_time_to | string | REQUIRED | End 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:
KEY | TYPE | DESCRIPTION |
---|---|---|
content_type | string | Type of the content, for this endpoint recorded only |
media_id | integer | Video ID |
value | integer | Number of peak viewers |
Example of a success response:
{"data": [{"attributes": {"content_type": "recorded","content_id": 238589,"value": 11},"type": "ViewerSecondSummary"
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR CONDITIONS |
---|---|
400 Bad Request | Validation of the parameters has failed, the response contains a detailed explanation |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed |
404 Not Found | Resource was not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |