POST Create a Report

Syntax

The following method is used to create a new report object in the system using POST.

Note: This method creates a new report object by passing a valid report JSON object in the POST body and returns ID of created report in response.

URL

https://api.onereporting.aol.com/v3/report-management/report 

JSON Object

Note: The following JSON Object is sent via the 'Body' with a 'Parameter content type' set to 'application/json'.

Note: The parameter highlighted in red is a placeholder for the mandatory value described below.

{
"name": "REPORT_NAME",
"platformAlias": "PLATFORM_ALIAS",
"createdOn": 0,
"archived": false,
"shared": false,
"parameters": [
{
"id": "cid",
"optional": false,
"multi": true
},
{
"id": "af",
"optional": false,
"multi": false
},
{
"id": "sd",
"optional": false,
"multi": false
},
{
"id": "ed",
"optional": false,
"multi": false
},
{
"id": "tz",
"optional": false,
"multi": false
}
],
"mainFilter": "REPORT_MAIN_FILTER",
"blocks": [
{
"title": "BLOCK_TITLE",
"blockType": "BLOCK_TYPE",
"withTotal": false,
"metrics": [
"METRICS"
],
"trendingTimeOption": "NONE",
"forecasting": false
}
]
}
  • REPORT_NAME - Replace this placeholder with your new report name.
  • PLATFORM_ALIAS - Replace this placeholder with an alias of the platform your report will be created in.
  • REPORT_MAIN_FILTER - Replace this placeholder with your company filter and point of view value.
  • BLOCK_TITLE - Replace this placeholder with your section name.
  • BLOCK_TYPE - Replace this placeholder with the name of your section type.
  • METRICS - Replace this placeholder with the name of your required metrics.

Example

JSON Object

Note: The following JSON Object is sent via the 'Body' with a 'Parameter content type' set to 'application/json'.

{
"name": "API test",
"platformAlias": "O2",
"createdOn": 1521647319350,
"archived": false,
"shared": false,
"parameters": [
{
"id": "cid",
"optional": false,
"multi": true
},
{
"id": "af",
"optional": false,
"multi": false
},
{
"id": "sd",
"optional": false,
"multi": false
},
{
"id": "ed",
"optional": false,
"multi": false
},
{
"id": "tz",
"optional": false,
"multi": false
}
],
"mainFilter": "publisherCompanyWithAffiliates",
"blocks": [
{
"title": "test section",
"blockType": "TABLE",
"withTotal": false,
"metrics": [
"videoStarts"
],
"trendingTimeOption": "NONE",
"forecasting": false
}
]
}

Response

Note: The response is the ID of your newly created report.

"5ac1d59ad334850001d95ee9"

 

 

Have more questions? Submit a request