Validate report definition

Note: When you submit a report definition for validation, the backend does not create the report, nor does the report definition count towards your report quota limit. For more information, see Custom Reporting limitations.

This endpoint submits a report definition and instructs the backend to validate the report from the given definition.

Method POST
URL https://api.videoplaza.com/v2/reports/validate
Header Authentication header (x-o-api-key)
Content type application/json
URL params -
Query params -
Body
{
    "reportName": "string",
    "reportDefinition": {
       "startDateTime": "ISO-8601 formatted date-time string",
       "endDateTime": "ISO-8601 formatted date-time string",
       "timeGranularity": "none|year|month|day|hour",
       "timeColumnIndex": zero-based integer,
       "dimensions": [
         "string", 
         "string",
         {
          "type": "audienceSegmentation",
          "providerId": "string",
          "segmentationId": integer
         }
       ],
       "metrics": [
         "string", 
         "string"
       ],
       "filters": [
         {
          "type": "in",
          "dimension": "string",
          "values": [
            "string", 
            "string"
          ]
         },
         {
          "type": "audienceSegment",
          "dimension": "audience_segment",
          "values": [
            "segmentationId-segmentId", 
            "segmentationId-segmentId"
          ],
          "providerId": "string" 
         }
      ]
   }
}
Only timeGranularity and timeColumnIndex are optional fields. All other fields are required. In addition:
  • Report name can be up to 255 characters.
  • You can pass in a maximum of eight dimensions in a report definition.
  • You can pass in only one in filter and only one audienceSegment filter.
  • You must pass in the filters and dimensions field, but these may be empty. For example: "filters": [] and "dimensions": [].
  • You must pass in the metrics field and it must have at least one value.
Success response

HTTP status: 200 OK

Header: -

Body: -

Example

Request header:

POST /v2/reports/validate HTTP/1.1
Host: api.videoplaza.com
Content-­type: application/json
x-o-api-key="<your key>"

Request body:

{
  "reportName" : "Monthly Revenue Quarter 4 2016 per Category for Mobile Devices",
  "reportDefinition": {
    "startDateTime": "2016-10-01T00:00:00+02:00",
    "endDateTime": "2016-12-31T23:59:59+02:00",
    "timeGranularity": "month",
    "dimensions": ["category"],
    "metrics": ["revenue"],
    "filters": [ 
      {
        "type": "in",
        "dimension": "device_container",
        "values" : ["56ca36a7-e350-48e2-a2ad-543d333d96de", "f797c997-d5b2-4a0c-8d53-2bc6vf947ec"]
      }
    ]
  }
}

Success response:

HTTP status:
  200 OK

Header: -

Body: -