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=falseto narrow the results to the latest available version. SetshowUnavailable=falseto 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 therequiredProductsspecified. 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
nameandversionvalues. 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
metricsarray, store an array of each metricnameyou want to include in the report. The accompanyingfullDescriptionprovides documentation for each metric. -
From the
filtersarray, store an object mapping of each filternameyou want to refine results with. Make sure to include any filters that arerequired. The accompanyingfullDescriptionprovides documentation for each filter. -
For each filter
namekey you include in the map, the value needs to be an array. If the filtertypeisintorstring, specify whatever set of values you want to refine the report. If thetypeisenum, then for each object invalues, include any availablevaluein the array. An accompanyingfullDescriptionmay clarify its use. -
The
intervalsarray specifies a set of duration values, available for each report, to aggregate each row of data. Select a value to later pass in as theintervalquery parameter. -
Specify an overall time span for the entire report as
startandendparameter values. But note that there may be amaxLimitcap on the number of data rows in each report. If theintervalvalue is too brief, the report may fail to execute.
The
startandendparameters must be rounded to the time interval you're using. For example, you can set the time range of 15 minutes for theFIVE_MINUTESinterval, or the time range of 3 hours for theHOURinterval.
