Skip to main content

POST Custom Report

Overview


The following table contains important information about the POST method in regards to posting a new custom report.

POST Custom Report
MethodPOST
URL or Endpoint/api/projects/projectId/custom-reports
HeadersAuthorization
ParametersprojectId
BodyCheck request body below.

The description of the URL parameter is as follows:

Field NameTypeDescription
namestringThe name of the custom report.
dateFromstring(Date)The starting date from which the custom report will retrieve data.
dateTostring(Date)The ending date until which the custom report will retrieve data.
reportEntityTypeIdinteger($int32)The ID indicating the type of report entity (e.g., for video 1, for podcast 2).
customReportDateRangeIdinteger($int32)The ID of the date range for the custom report.
reportDimensionKeysarray[String]An array of dimension keys to be included in the custom report.
reportMetricKeysarray[String]An array of metric keys to be included in the custom report.
reportFiltersarray[Object]An array of filter objects used to refine the custom report.
filterOperatorIdinteger($int32)The ID of the filter operator used for the report filter.
valuestringThe value associated with the filter.
tip

For a complete list of fields available for custom reports, use the Custom Report Fields API

Response

{
"success": true,
"errors": ["string"],
"messages": ["string"],
"result": {
"id": 0,
"name": "string",
"dateFrom": "2022-04-05T15:19:56.773Z",
"dateTo": "2022-04-05T15:19:56.773Z",
"customReportDateRangeId": 0,
"reportDimensions": [
{
"id": 0,
"display": "string",
"key": "string"
}
],
"reportMetrics": [
{
"id": 0,
"display": "string",
"key": "string"
}
],
"reportFilters": [
{
"id": 0,
"filterOperatorId": 0,
"customReportId": 0,
"filterOperatorDisplay": "string",
"filterDisplay": "string",
"value": "string"
}
]
},
"resultInfo": "string",
"statusCode": 0
}
Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false.
errorsarray[]Indicates if there was an error.
messagesarray[]Returns the response message from back-end.
resultarray[Object]Returns the response object.
idinteger($int32)The id of the custom report.
namestringThe name of the custom report.
dateFromstring(Date)The starting date the custom report will get the data from.
dateTostring(Date)The end date the custom report will get the data from.
CustomReportDateRangeIdinteger($int32)The ID of the range of the custom report date.
reportDimensionsarray[Object]The report dimensions.
reportMetricarray[Object]The report metrics.
reportFiltersarray[Object]An array comprised of report filter objects.
idinteger($int32)The id of the filter
filterOperatorIdinteger($int32)The filter ID.
customReportIdinteger($int32)>The ID of the custom report.
filterOperatorDisplaystringThe filter operator display.
filterDisplaystringThe filter display.
valuestringThe value of the filter.
resultInfostringReturns extra information about the result.
statusCodeinteger($int32)Returns the HTTP Status Code.

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:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed