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 KeyDescriptionType
aggregationTypeTime interval by which the report data is broken down.

Allowed values: summary, daily, weekly, monthly, hourOfDay, dayOfWeek, hourByDay
string
startTimeStart 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
endTimeEnd time for the reporting period. Must be in the format yyyy-mm-ddThh:mm:ss+offset as per RFC 3339.string
outputPathPath 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
dimensionsProperties of the campaign objects included in the report. Minimum of one dimension required.comma-separated array containing one or more dimension DTOs
*filtersCampaign objects to include in the report. Defaults to all campaign objects.comma-separated array containing one or more filter DTOs
metricsPerformance or delivery metrics by which campaign objects in the report are measured.comma-separated array containing one or more metric DTOs

dimension DTO

KeyDescriptionType
nameName of reporting dimension.

Allowed values
string
outputNameHeader name for the dimension in the generated report. Defaults to value of name.string

filter DTO

KeyDescriptionType
objectIdsObject IDs to filter for and include.comma-separated array of strings
objectTypeType of campaign objects specified in objectIds.

Allowed values: advertiser, insertionOrder, package, lineItem, ad, creative
string

metric DTO

KeyDescriptionType
*currencyAlphaCodeThe currency used to represent report data. Can be applied to any metric (even non-currency values) and defaults to USD.

Allowed values
string
nameName of reporting metric.

Allowed values
string
outputNameHeader 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

KeyDatatypeRequiredDescription
marketIdnumberNumeric 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"}]}