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 | |
---|---|
Method | POST |
URL or Endpoint | /api/projects/projectId /custom-reports |
Headers | Authorization |
Parameters | projectId |
Body | Check request body below. |
The description of the URL parameter is as follows:
Field Name | Type | Description |
---|---|---|
name | string | The name of the custom report. |
dateFrom | string(Date) | The starting date from which the custom report will retrieve data. |
dateTo | string(Date) | The ending date until which the custom report will retrieve data. |
reportEntityTypeId | integer($int32) | The ID indicating the type of report entity (e.g., for video 1, for podcast 2). |
customReportDateRangeId | integer($int32) | The ID of the date range for the custom report. |
reportDimensionKeys | array[String] | An array of dimension keys to be included in the custom report. |
reportMetricKeys | array[String] | An array of metric keys to be included in the custom report. |
reportFilters | array[Object] | An array of filter objects used to refine the custom report. |
filterOperatorId | integer($int32) | The ID of the filter operator used for the report filter. |
value | string | The 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 Name | Type | Description |
---|---|---|
success | bool | If the response is successful it will return true. Otherwise will return false. |
errors | array[] | Indicates if there was an error. |
messages | array[] | Returns the response message from back-end. |
result | array[Object] | Returns the response object. |
id | integer($int32) | The id of the custom report. |
name | string | The name of the custom report. |
dateFrom | string(Date) | The starting date the custom report will get the data from. |
dateTo | string(Date) | The end date the custom report will get the data from. |
CustomReportDateRangeId | integer($int32) | The ID of the range of the custom report date. |
reportDimensions | array[Object] | The report dimensions. |
reportMetric | array[Object] | The report metrics. |
reportFilters | array[Object] | An array comprised of report filter objects. |
id | integer($int32) | The id of the filter |
filterOperatorId | integer($int32) | The filter ID. |
customReportId | integer($int32)> | The ID of the custom report. |
filterOperatorDisplay | string | The filter operator display. |
filterDisplay | string | The filter display. |
value | string | The value of the filter. |
resultInfo | string | Returns extra information about the result. |
statusCode | integer($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