Skip to main content

GET Top Domains

Overview


This GET request is used to retrieve the top domains for a specified project. Below are the details for the request:

GET Top Domains
MethodGET
URL or Endpoint/api/v2/projects/projectId/analytics/topDomains
HeadersAuthorization
ParametersvideoId, isLive, intervalType, startDate, endDate, items, projectId
BodyNot Applicable

The following table describes the URL parameter for projectId:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique identifier for the project.

The table below provides details about each query parameter:

Parameter NameMandatoryTypeDescription
videoIdNostringUnique identifier of the video.
isLiveNobooleanA boolean indicating whether the video is live.
intervalTypeYesinteger($int32)The type of interval for the analytics data. Available values are: 0, 1, 2, 3, 4, 5, 6, 7, 8.
startDateNostring($date-time)The start date for the analytics data you wish to retrieve.
endDateNostring($date-time)The end date for the analytics data you wish to retrieve.
itemsNointeger($int32)The number of top domains to retrieve.
projectIdYesstringThe unique identifier for the project.

Request Body​

This GET request does not contain a request body.

Response​

{
"success": true,
"errors": [],
"messages": [],
"result": {
"topDomains": [
{
"domain": "example.com",
"domainNr": 1500
},
{
"domain": "anotherdomain.com",
"domainNr": 800
}
]
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successbooleanIndicates whether the request was successful.
errorsarray[]A list of errors that occurred during the request.
messagesarray[]A list of messages returned by the backend.
resultarray[Object]An array containing the analytics result data.
domainstringThe name of the domain.
viewersinteger($int32)The number of viewers from that domain.
resultInfostringAdditional information about the result.
statusCodeinteger($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