Skip to main content

GET Report

Overview


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

GET Report
MethodGET
URL or Endpoint/api/v2/projects/projectId/reports
HeadersAuthorization
Parametersquery, 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.

Request

Query Parameter Description

The query parameter is passed as an object in the request.

Example of a default query

{"startDate":"2024-08-19T00:00:00",
"endDate":"2024-08-20T00:00:00",
"dimensions":["date"],
"metrics":
[
{"field":"completes"},
{"field":"embeds"},
{"field":"play_per_viewer"},
{"field":"unique_viewers"},
{"field":"ad_clicks"},
{"field":"25_completes"},
{"field":"ad_completes"},
{"field":"time_watched"},
{"field":"complete_rate"},
{"field":"plays"}
],
"filters":
[{"field":"video",
"operator":"equal",
"value":"{videoId}"}]
}

tip

To create a query specifying the desired fields, use the value of the key as the value for the field key in your query. For example, "field":"embeds".

To find the complete list of key values, visit the Custom Report Fields API

Response

{
"success": true,
"errors": [
"string"
],
"messages": [
"string"
],
"result": {
"rowsMetadata": {
"metrics": [
{
"id": 0,
"display": "string",
"key": "string"
}
],
"filters": [
{
"display": "string"
}
],
"dimensions": [
{
"id": 0,
"display": "string",
"key": "string"
}
],
"startDate": "2024-08-20T11:23:57.809Z",
"endDate": "2024-08-20T11:23:57.809Z"
},
"startDate": "2024-08-20T11:23:57.809Z",
"endDate": "2024-08-20T11:23:57.809Z",
"currentPage": 0,
"totalPages": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
null
]
},
"resultInfo": "string",
"statusCode": 0
}

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[string]A list of errors that occurred during the request.
messagesarray[string]A list of messages returned by the backend.
resultobjectAn object containing the report data and metadata.
rowsMetadataobjectMetadata related to the rows in the result.
metricsarray[Object]An array of metrics included in the report, each with an ID, display name, and key.
filtersarray[Object]An array of filters applied to the report data.
dimensionsarray[Object]An array of dimensions included in the report, each with an ID, display name, and key.
startDatestring(Date)The starting date of the report data.
endDatestring(Date)The ending date of the report data.
startDatestring(Date)The start date for the current result set.
endDatestring(Date)The end date for the current result set.
currentPageinteger($int32)The current page number of the result set.
totalPagesinteger($int32)The total number of pages available in the result set.
pageSizeinteger($int32)The number of items per page in the result set.
totalCountinteger($int32)The total number of items in the result set.
itemsarray[Object]An array containing the items returned in the result.
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