Each report allows a different range of request options, so first you need to gather all the information you'll need to execute it:
-
Gather a list of CP codes for which you want to report data.
-
Run the List report types operation. Optionally specify
showDeprecated=false
to narrow the results to the latest available version. SetshowUnavailable=false
to omit any reports that your API client's identity can't execute.If you want to view other reports not available under your product, set
showUnavailable=true
, but note that you can't execute any report unless it is marked asavailable
. While you can execute many reports under any Akamai product, some require specific sets of products to enable them. If a report is unexpectedly notavailable
, make sure you're executing the report with access to any of therequiredProducts
specified. Also make sure the API client identity has any of the permissions specified inrequiredRoles
. -
Optionally store any object from the List report types operation's response array and store its
name
andversion
values. Otherwise use those values to run the Get a report type operation, storing its response object, which includes most of the data you need to execute the report. -
From the report type object's
metrics
array, store an array of each metricname
you want to include in the report. The accompanyingfullDescription
provides documentation for each metric. -
From the
filters
array, store an object mapping of each filtername
you want to refine results with. Make sure to include any filters that arerequired
. The accompanyingfullDescription
provides documentation for each filter. -
For each filter
name
key you include in the map, the value needs to be an array. If the filtertype
isint
orstring
, specify whatever set of values you want to refine the report. If thetype
isenum
, then for each object invalues
, include any availablevalue
in the array. An accompanyingfullDescription
may clarify its use. -
The
intervals
array specifies a set of duration values, available for each report, to aggregate each row of data. Select a value to later pass in as theinterval
query parameter. -
Specify an overall time span for the entire report as
start
andend
parameter values. But note that there may be amaxLimit
cap on the number of data rows in each report. If theinterval
value is too brief, the report may fail to execute.
The
start
andend
parameters must be rounded to the time interval you're using. For example, you can set the time range of 15 minutes for theFIVE_MINUTES
interval, or the time range of 3 hours for theHOUR
interval.