Fetch a Report's Results

This endpoint retrieves the report in .csv format. You can only fetch a report when its status is READY.

Method GET
URL /v2/reports/{reportId}/result
Header
  • Authentication header (x-o-api-key)
  • Accept: text/plain or application/json for results in CSV or JSON format respectively.
Content type application/json
URL params Provide the ID of the report in the {reportId} parameter, which you get after successfully submitting a report for creation.
Query params -
Body -
Success response

HTTP status: 200 OK

Header:

Content-Disposition: the attached report in .csv or .json format.

Body:

"category_0", "category_0_name", "category", "category_name", "impression"
"11", "Sports","","",6598
"","","111","Football",8456
"","","112","Tennis",1574
"","","113","Basketball",567

or

{
  "metaData": {
    "creationDate": 1506681978650,
    "name": "Impressions per category and subcategory december 2016",
    "rowCount": 4,
    "reportDefinition": {
      "startDateTime": "2016-12-01T00:00:00+02:00",
      "endDateTime": "2017-01-01T00:00:00+02:00",
      "timeGranularity": "none",
      "dimensions": ["category", "category"],
      "metrics": ["impression"],
      "filters": []
    }
  },
  "headers": [
    {
      "name": "category_0",
      "type": "STRING"
    },
    {
      "name": "category_0_name",
      "type": "STRING"
    },
    {
      "name": "category",
      "type": "STRING"
    },
    {
      "name": "category_name",
      "type": "STRING"
    },
    {
      "name": "impression",
      "type": "INTEGER"
    }
  ],
  "rows": [
    [
      "11",
      "Sports",
      "",
      "",
      6598
    ],
    [
      "",
      "",
      "111",
      "Football",
      8456
    ],
    [
      "",
      "",
      "112",
      "Tennis",
      1574
    ],
    [
      "",
      "",
      "113",
      "Basketball",
      567
    ]
  ]
}
Note: Only the JSON output contains the report definition of the requested report. Putting the report definition in the CSV output would break the format and make it more difficult to import in spreadsheet software.

Example

Request header:

GET /v2/reports/e683514b-b4c9-4988-9b2f-9d6a6a300c08/result HTTP/1.1
Host: api.videoplaza.com
Accept: text/plain
x-o-api-key="<your key>"

Request body: -

Success response:

HTTP status:
  200 (OK)

Header:
  Content-Disposition: attachement; filename="e683514b-b4c9-4988-9b2f-9d6a6a300c08.csv"

Body:
  "category_0", "category_0_name", "category", "category_name", "impression"
  "11", "Sports","","",6598
  "","","111","Football",8456
  "","","112","Tennis",1574
  "","","113","Basketball",567

Was this article helpful?