New Report
POST {{reporting_url}}/reports?marketId=1
Request a new report
You can create a new report by sending this POST
request. To define characteristics of your report, open the body tab and edit the JSON object.
For DTO fields dimensions
, filters
, and metrics
, see the structure details below to customize report values.
Request Body (Definitions)
*Optional element
JSON Object Key | Description | Type |
---|---|---|
aggregationType | Time interval by which the report data is broken down. Allowed values: summary, daily, weekly, monthly, hourOfDay, dayOfWeek, hourByDay | string |
startTime | Start time for the reporting period. Must be in the format yyyy-mm-ddThh:mm:ss+offset as per RFC 3339. Note: The time zone of the generated report is based on the offset specified here. | string |
endTime | End time for the reporting period. Must be in the format yyyy-mm-ddThh:mm:ss+offset as per RFC 3339. | string |
outputPath | Path to which the report should be sent. Must be an S3 bucket and defined in the format s3n://ACCESSKEY:SECRETKEY@REGION/BUCKETPATH/FILENAME.json. If no path is defined, the Reporting Service will store the report. | string |
dimensions | Properties of the campaign objects included in the report. Minimum of one dimension required. | comma-separated array containing one or more dimension DTOs |
*filters | Campaign objects to include in the report. Defaults to all campaign objects. | comma-separated array containing one or more filter DTOs |
metrics | Performance or delivery metrics by which campaign objects in the report are measured. | comma-separated array containing one or more metric DTOs |
dimension
DTO
Key | Description | Type |
---|---|---|
name | Name of reporting dimension. Allowed values | string |
outputName | Header name for the dimension in the generated report. Defaults to value of name . | string |
filter
DTO
Key | Description | Type |
---|---|---|
objectIds | Object IDs to filter for and include. | comma-separated array of strings |
objectType | Type of campaign objects specified in objectIds . Allowed values: advertiser, insertionOrder, package, lineItem, ad, creative | string |
metric
DTO
Key | Description | Type |
---|---|---|
*currencyAlphaCode | The currency used to represent report data. Can be applied to any metric (even non-currency values) and defaults to USD. Allowed values | string |
name | Name of reporting metric. Allowed values | string |
outputName | Header name for the metric in the generated report. Defaults to value of name . | string |
Response Body
Within the 'Location' header of your response, the generated report's unique ID will be appended to the URL endpoint. Use this report ID in a GET
Report Details request.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
marketId | number | Numeric ID associated with the parent market of reported campaign objects. Required. |
Request Body
{"aggregationType"=>"daily", "startTime"=>"2022-07-22T00:00:00Z", "endTime"=>"2022-07-28T00:00:00Z", "outputPath"=>"", "dimensions"=>[{"name"=>"advertiserId", "outputName"=>"advertiserId"}, {"name"=>"insertionOrderId", "outputName"=>"insertionOrderId"}], "filters"=>[{"objectIds"=>["1606727072", "77657209"], "objectType"=>"advertiser"}], "metrics"=>[{"currencyAlphaCode"=>"usd", "name"=>"advertiserEcpc", "outputName"=>"advertiserEcpc"}, {"name"=>"impressions", "outputName"=>"impressions"}]}