GET Top Browsers
Overview
The following table provides essential details about the GET method for retrieving the top browsers in video analytics.
| GET Analytics/Top Browsers | |
|---|---|
| Method | GET |
| URL or Endpoint | /api/v2/projects/projectId/analytics/topBrowsers |
| Headers | Authorization |
| Parameters | videoId, isLive, intervalType, startDate, endDate, items, projectId |
| Body | Not Applicable |
The following table describes the URL parameter for projectId:
| projectId URL Parameter | |
|---|---|
| URL Parameter Name | projectId |
| Mandatory | Yes |
| Type | string |
| Description | Unique identifier for the project. |
The table below provides details about each query parameter:
| Parameter Name | Mandatory | Type | Description |
|---|---|---|---|
| videoId | No | string | Unique identifier of the video. |
| isLive | No | boolean | A boolean indicating whether the video is live. |
| intervalType | No | integer($int32) | The type of interval for the analytics data. Available values are: 0, 1, 2, 3, 4, 5. |
| startDate | No | string($date-time) | The start date for the analytics data you wish to retrieve. |
| endDate | No | string($date-time) | The end date for the analytics data you wish to retrieve. |
| items | No | integer($int32) | The number of top browsers to retrieve. |
| projectId | Yes | string | The unique identifier for the project. |
Request Body
This GET request does not contain a request body.
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"topBrowsers": [
{
"browser": "Chrome",
"viewers": 1500
},
{
"browser": "Safari",
"viewers": 800
}
]
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Field Name | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the request was successful. |
| errors | array[] | A list of errors that occurred during the request. |
| messages | array[] | A list of messages returned by the backend. |
| result | array[Object] | An array containing the analytics result data. |
| browser | string | The name of the browser. |
| viewers | integer($int32) | The number of viewers using that browser. |
| resultInfo | string | Additional information about the result. |
| statusCode | integer($int32) | The HTTP status code of the response. |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Result Not Found
- 500: Internal Server Error
- 503: Backend Fetch Failed