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/v4/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",
  "archived": false,
  "shared": false,
  "filters": [
    {
      "alias": "DATETIME_FILTER",
      "filterType": "DEFAULT",
      "parameters": {
        "ed": [],
        "sd": []
      }
    },
    {
      "alias": "timeZone",
      "filterType": "DEFAULT",
      "parameters": {
        "tz": []
      }
    },
    {
      "alias": "REPORT_MAIN_FILTER",
      "filterType": "MAIN",
      "parameters": {
        "af": [],
        "cid": []
      }
    }
  ],
  "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": "gauge test2",
  "platformAlias": "O2",
  "archived": false,
  "shared": false,
  "filters": [
    {
      "alias": "dateTime",
      "filterType": "DEFAULT",
      "parameters": {
        "ed": [],
        "sd": []
      }
    },
    {
      "alias": "timeZone",
      "filterType": "DEFAULT",
      "parameters": {
        "tz": []
      }
    },
    {
      "alias": "publisherCompanyWithAffiliates",
      "filterType": "MAIN",
      "parameters": {
        "af": [],
        "cid": []
      }
    }
  ],
  "blocks": [
    {
      "title": "Report Section 1",
      "blockType": "GAUGE_CHART",
      "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