Insight Report Requests

Request a New Insight Report from an Insight Report Definition

Method POST
URL https://api.videoplaza.com/api/2.0/report
Header Authentication header (x-o-api-key)
Content type application/json
URL params -
Query params useNames:
  • false: returns entity ID, for example "4068c007-a3df-484b-b9a6-b62813f3ea89".
  • true: returns entity name, for example "royco_sauce_2016".
Body
{
  "filters": [
    {}
  ],
  "id": "string" (The id of the report defintion to use)
}
See below for more information.
Success response

HTTP status: 202 Accepted

Header: Location: URI to the location of your report

Body: -

Note: Possible HTTP status responses:
  • 200 (OK)
  • 202 (Accepted)

Filters

The entries in the filter map should have one of the following structures:

{ "type":  "CAMPAIGN", 
  "id": ID 
},
{ "type":  "ADVERTISER",
  "id": ID 
},
{ "type":  "BRAND", 
  "id": ID 
},
{ "type":  "AGENCY", 
  "id": ID 
},
{ "type":  "CONTENT_PARTNER", 
  "id": ID
},
{ "type":  "CATEGORY", 
  "id":ID 
},
{ "type":  "TIME_PERIOD", 
  "dynamicTimePeriodType": dynamicTimePeriodType 
},
{ "type":  "TIME_PERIOD", 
  "start":  "2013-01-01T00:00:00", 
  "end":  "2013-01-02T00:00:00"
}

Possible dynamicTimePeriodType:

SO_FAR_THIS_WEEK, SO_FAR_THIS_MONTH, SO_FAR_THIS_QUARTER, SO_FAR_THIS_YEAR, YESTERDAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, LAST_7_DAYS, LAST_30_DAYS, LAST_90_DAYS, LAST_365_DAYS

Example:

Request header:

POST /api/2.0/report?useNames=false HTTP/1.1
Host: api.videoplaza.com
x-o-api-key="<your key>"
Content-Type: application/json
Content-Length: 114

Request body:

{
  "filters": [
  {"type": "CAMPAIGN", "id": "1cc9f23e-6b18-494b-a638-4f1fd5b45e09"}],
  "id": "56de9277498ed663342784c7"
}

Success response:

HTTP status:
  202 (Accepted)

Header:
  Location: <URI with the location of your report>

Check Job Status

Method GET
URL https://api.videoplaza.com/api/2.0/report/job/{id}
Header Authentication header (x-o-api-key)
Content type application/json
URL params ID of the report job
Query params -
Body -
Success response

HTTP status: 201 Created

Header: Location: URI to the location of your report

Body: -

Note: Possible HTTP status responses and their meaning:
  • 200 (OK): report is processing or failed.
  • 201 (Created): report created with location.

Example:

Request header:

GET /api/2.0/report/job/5767b716498e988a95177567 HTTP/1.1
Host: api.videoplaza.com
Content-Type: application/json
x-o-api-key="<your key>"

Request body: NA

Success response:

HTTP status:
   201 (Created)

Header:
  Location: <URI with the location of your report>

Fetch Insight Report Data

Method GET
URL https://api.videoplaza.com/api/2.0/report/{id}
Header Authentication header (x-o-api-key)
Content type application/json
URL params ID of the report
Query params repeatDimensionValues:
  • false: does not repeat the entity ID or entity name when getting a report for a structure, for example multiple category breakdowns. Instead, it returns the value "null".
  • true: repeats the entity ID or entity name when getting a report for a structure.
Body -
Success response

HTTP status: 200 OK

Header: -

Body: this returns a completed report, without subtotals.

Example:

Request header:

GET /api/2.0/report/5767b716498e988a95177567?repeatDimensionValues=true HTTP/1.1
Host: api.videoplaza.com
Content-Type: application/json
x-o-api-key="<your key>"

Request body: NA

Success response:

HTTP status:
    200 (OK)
 
Body:
{
    "id": "57614e85498e01b4aeb3cbaa",
    "headers": [
        "Ad",
        "Impressions",
        "Click-throughs",
        "CTR",
        "Completion_rate"
    ],
    "rows": [
        [
            "4068c007-a3df-484b-b9a6-b62813f3ea89",
            31984,
            563,
            0.0176,
            0.457
        ],
        [
            "60c60e4a-60e7-48bc-84d8-0e03e78dcd0b",
            546504,
            7870,
            0.0144,
            0.8771
        ]
    ]
}

Was this article helpful?