Generate a report

POST https://{{host}}/reporting-api/v2/reports/:productFamily/:reportingArea/:report/data

Produces a report in either JSON or CSV format.

Request Params

KeyDatatypeRequiredDescription
startstring(Optional) Start date in ISO 8601 format. Use this parameter together with end, or else replace both with a fixed timeRange.
endstring(Optional) End date in ISO 8601 format. Use this parameter together with start, or else replace both with a fixed timeRange.
timeRangestring(Optional) Enum Predefined time range, either LAST_15_MINUTES, LAST_30_MINUTES, LAST_1_HOUR, LAST_3_HOURS, LAST_6_HOURS, LAST_12_HOURS, LAST_1_DAY, LAST_2_DAYS, LAST_1_WEEK, LAST_30_DAYS, or LAST_90_DAYS. Use this as an alternative to a more flexible start and end time range. Support for specific time range values may vary by report type. See the report documentation under Available reports.
asyncstring(Optional) Enables the asynchronous flow to get the data. By default, false.
accountSwitchKeystring(Optional) For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Request Body

{"dimensions"=>["hostname", "responseCode", "time5minutes"], "filters"=>[{"expression"=>"50", "metricName"=>"edgeBytesSum", "operator"=>"GREATER_THAN"}, {"dimensionName"=>"hostname", "expressions"=>["example.com", "custom.com", "origin.com"], "operator"=>"IN_LIST"}], "limit"=>1000, "metrics"=>["edgeBytesSum", "edgeHitsSum"], "sortBys"=>[{"name"=>"hostname", "sortOrder"=>"ASCENDING"}, {"name"=>"edgeHitsSum", "sortOrder"=>"DESCENDING"}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"data":[{"edgeBytesSum":1322,"edgeHitsSum":10,"hostname":"example.com","responseCode":404},{"edgeBytesSum":321,"edgeHitsSum":1,"hostname":"origin.com","responseCode":404},{"edgeBytesSum":4331,"edgeHitsSum":122,"hostname":"custom.com","responseCode":200}],"metadata":{"dimensions":[{"authorizable":false,"filterType":"TEXT","filterable":true,"mandatory":false,"name":"hostname","type":"STRING"},{"authorizable":false,"filterType":"TEXT","filterable":true,"mandatory":false,"name":"responseCode","type":"LONG"}],"end":"2024-03-27T13:18:04.137674827Z","filters":[{"dimensionName":"cpcode","expressions":["1242","7802","7983"],"operator":"IN_LIST"}],"hasMoreRows":false,"limit":1000,"links":[{"allow":["POST"],"href":"/reporting-api/v2/reports/delivery/traffic/current/data","rel":"self"}],"metrics":[{"filterable":true,"mandatory":false,"name":"edgeHitsSum","type":"LONG"},{"filterable":true,"mandatory":false,"name":"edgeBytesSum","type":"LONG"}],"name":"CDN traffic report data","sortBys":[{"name":"hostname","sortOrder":"ASCENDING"},{"name":"edgeHitsSum","sortOrder":"DESCENDING"}],"start":"2024-03-27T13:08:05.137674827Z"}}