apiusagedetails-by-time

🚧

The apiusagedetails-by-time report is being discontinued

This report is deprecated and will be deactivated on July 1, 2025. As an alternative, use the new common/apis/usage-details report, based on the Reporting API v2.

The following shows how to generate the apiusagedetails-by-time report using either the Reporting API's Generate a report POST operation or the Get a cacheable report GET operation. Details about each report's supported products, metrics, filters, and available data intervals are also available dynamically by running the API's Get a report type operation, also shown below. See also other available reports.

Report definition

This report allows you to audit details of latest individual API calls for a given timeframe.

Business object: account_id

Data available for: 92 days

Required products: EDGECONTROL

Available metrics

MetricDescription
Data metrics
clientIdID of client generating API request.
clientIpIP generating API request.
clientOwnerUsername of client owner.
clientTokenClient token used for generating API request.
methodA request method indicating the action performed on a resource.
responseCodeResponse code for the API request.
timestampDate and time of API request.
uriAPI request details.

Available filters

FilterTypeDescription
Optional filters
client_tokenStringClient token used for generating API request.
contract_typeStringContract type.
endpointStringAn API endpoint enabled by Akamai.
http_methodEnumerationA request method indicating the action performed on a resource.
head: Retrieves header information about the target resource, with no message body in the response.
other: Other method than head, post, get, delete, put.
post: Sends information to the server.
get: Retrieves information about the target resource.
delete: Removes all information about the target resource.
put: Replaces existing information about the target resource.
response_classEnumerationA class of HTTP response status codes, from 0xx through 6xx.
0xx: An aborted action on the client side.
1xx: An informational response, like Continue.
2xx: A successful response.
3xx: Success, but a redirect where the thing you want is somewhere else.
4xx: Error, where there’s some problem with the client request.
5xx: Error, where there’s some problem with how the API server responded to the client request.
6xx: Invalid headers (defined by Akamai).
response_codeStringAn HTTP response status code, for example, 201.
response_statusEnumerationAn indicator of whether the HTTP response resulted in success or an error.
success: Successful HTTP response status.
error: Error HTTP response status.Y
url_containStringURL contains the specified string.
url_end_withStringURL ends with the specified string.
url_exact_matchStringURL is an exact match for the specified string.
url_matchStringURL matches the specified string.
url_not_containStringURL does not contain the specified string.
url_not_end_withStringURL does not end with the specified string.
url_not_matchStringURL does not match the specified string.
url_not_start_​withStringURL does not start with the specified string.
url_start_withStringURL starts with the specified string.
usernameStringName of client generating API request.

POST request

POST /reporting-api/v1/reports/apiusagedetails-by-time/versions/1/report-data{?start,end}

Sample: /reporting-api/v1/reports/apiusagedetails-by-time/versions/1/report-data?start=2023-03-01T00%3A00%3A00Z&end=2023-04-01T00%3A00%3A00Z

Query parameters

ParameterTypeSampleDescription
Required
startString2023-03-01T00:00:00ZSpecifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp.
endString2023-04-01T00:00:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp.

JSON request members

MemberTypeDescription
objectIdsArraySpecifies the set of account_id values you want to report on.
metricsArrayThe set of desired metrics. If omitted, the report includes all available metrics.
filtersMap of ArraysSpecifies a set of custom filters, with each filter's name keying an array with each filter's set of values.

Request body:

{
    "objectIds": [
        "1-123A",
        "1-1TGTG",
        "1-1TJZFB"
    ],
    "metrics": [
        "clientId",
        "clientIp",
        "clientOwner",
        "clientToken",
        "method",
        "responseCode",
        "timestamp",
        "uri"
    ],
    "filters": {
        "client_token": [
            "token_1",
            "token_2"
        ],
        "contract_type": [
            "1-3CV382",
            "1-6T5ZND"
        ],
        "endpoint": [
            "endpoint/1",
            "endpoint/2"
        ],
        "http_method": [
            "post",
            "delete"
        ],
        "response_class": [
            "4xx",
            "1xx"
        ],
        "response_code": [
            "201",
            "200"
        ],
        "response_status": [
            "success",
            "error"
        ],
        "url_contain": [
            "/shop",
            "/about"
        ],
        "url_end_with": [
            ".html",
            ".jsp"
        ],
        "url_exact_match": [
            "https://www.example.com/shop/index.html",
            "https://www.example.com/about/index.html"
        ],
        "url_match": [
            "https://www.example.com/shop",
            "https://www.example.com/about"
        ],
        "url_not_contain": [
            "/blog",
            "/contact"
        ],
        "url_not_end_with": [
            ".pdf",
            ".doc"
        ],
        "url_not_match": [
            "https://www.example.com/blog",
            "https://www.example.com/contact"
        ],
        "url_not_start_with": [
            "email:",
            "ftp:"
        ],
        "url_start_with": [
            "http:",
            "https:"
        ],
        "username": [
            "username3",
            "username1"
        ]
    }
}

GET request

GET /reporting-api/v1/reports/apiusagedetails-by-time/versions/1/report-data{?start,end,objectIds,allObjectIds,metrics,filters}

Sample: /reporting-api/v1/reports/apiusagedetails-by-time/versions/1/report-data?start=2023-03-01T00%3A00%3A00Z&end=2023-04-01T00%3A00%3A00Z&objectIds=1-123A,1-1TGTG,1-1TJZFB&metrics=clientId%2CclientIp&filters=client_token%3Dtoken_1%2Cclient_token%3Dtoken_2%2Ccontract_type%3D1-3CV382%2Ccontract_type%3D1-6T5ZND

Query parameters

ParameterTypeSampleDescription
Required
startString2023-03-01T00:00:00ZSpecifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp.
endString2023-04-01T00:00:00ZSpecifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp.
objectIdsString1-123A,1-1TGTG,​1-1TJZFBAs an alternative to allObjectIds, specifies the set of unique IDs for the account_id objectType you want to report on, formatted as a comma-delimited list.
Optional
metricsStringclientId,client​IpSpecifies a comma-separated list of metrics to include in the report, otherwise all metrics if omitted. The set of available metrics depends on the type of report. URL-encode the entire value in the GET request.
filtersStringclient_token=​token_​1,​client_​token=​token_​2,​contract_​type=​1-3CV382,​contract_​type=​1-6T5ZNDSpecifies criteria to filter the report’s data. The set of available filters depends on the type of report. Separate each filter name and value with an equals (=) character, and separate various name/value pairs with commas (,). To specify more than one filter value, repeat the filter name. See the accompanying example for guidance. URL-encode the entire value in the GET request.

JSON response

Status 200 application/json

Response body:

{
    "metadata": {
        "name": "apiusagedetails-by-time",
        "version": "1",
        "outputType": "FLAT",
        "start": "2023-03-01T00:00:00Z",
        "end": "2023-04-01T00:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [
            {
                "name": "client_token",
                "values": [
                    "token_1",
                    "token_2"
                ]
            },
            {
                "name": "contract_type",
                "values": [
                    "1-3CV382",
                    "1-6T5ZND"
                ]
            },
            {
                "name": "endpoint",
                "values": [
                    "endpoint/1",
                    "endpoint/2"
                ]
            },
            {
                "name": "http_method",
                "values": [
                    "post",
                    "patch"
                ]
            },
            {
                "name": "response_class",
                "values": [
                    "3xx",
                    "5xx"
                ]
            },
            {
                "name": "response_code",
                "values": [
                    "500",
                    "100"
                ]
            },
            {
                "name": "response_status",
                "values": [
                    "success",
                    "error"
                ]
            },
            {
                "name": "url_contain",
                "values": [
                    "/shop",
                    "/about"
                ]
            },
            {
                "name": "url_end_with",
                "values": [
                    ".html",
                    ".jsp"
                ]
            },
            {
                "name": "url_exact_match",
                "values": [
                    "https://www.example.com/shop/index.html",
                    "https://www.example.com/about/index.html"
                ]
            },
            {
                "name": "url_match",
                "values": [
                    "https://www.example.com/shop",
                    "https://www.example.com/about"
                ]
            },
            {
                "name": "url_not_contain",
                "values": [
                    "/blog",
                    "/contact"
                ]
            },
            {
                "name": "url_not_end_with",
                "values": [
                    ".css",
                    ".pdf"
                ]
            },
            {
                "name": "url_not_match",
                "values": [
                    "https://www.example.com/blog",
                    "https://www.example.com/contact"
                ]
            },
            {
                "name": "url_not_start_with",
                "values": [
                    "email:",
                    "ftp:"
                ]
            },
            {
                "name": "url_start_with",
                "values": [
                    "http:",
                    "https:"
                ]
            },
            {
                "name": "username",
                "values": [
                    "username2",
                    "username3"
                ]
            }
        ],
        "columns": [
            {
                "name": "clientId",
                "label": "Client ID"
            },
            {
                "name": "clientIp",
                "label": "Client IP"
            },
            {
                "name": "clientOwner",
                "label": "Client owner"
            },
            {
                "name": "clientToken",
                "label": "Client token"
            },
            {
                "name": "method",
                "label": "Method"
            },
            {
                "name": "responseCode",
                "label": "Response code"
            },
            {
                "name": "timestamp",
                "label": "Timestamp"
            },
            {
                "name": "uri",
                "label": "URI"
            }
        ],
        "objectType": "account_id",
        "objectIds": [
            "1-123A",
            "1-1TGTG",
            "1-1TJZFB"
        ]
    },
    "data": [
        {
            "clientId": "client3",
            "clientIp": "127.0.0.1",
            "clientOwner": "owner2",
            "clientToken": "token3",
            "method": "delete",
            "responseCode": "503",
            "timestamp": "2019-05-01T00:00:10Z",
            "uri": "example.com/static/html"
        },
        {
            "clientId": "client5",
            "clientIp": "127.0.0.1",
            "clientOwner": "owner1",
            "clientToken": "token2",
            "method": "patch",
            "responseCode": "500",
            "timestamp": "2019-05-01T00:00:25Z",
            "uri": "data.example.com/upload/file"
        },
        {
            "clientId": "Other",
            "clientIp": "Other",
            "clientOwner": "Other",
            "clientToken": "Other",
            "method": "Other",
            "responseCode": "Other",
            "timestamp": "Other",
            "uri": "Other"
        },
        {
            "clientId": "client2",
            "clientIp": "0.0.0.0",
            "clientOwner": "owner2",
            "clientToken": "token2",
            "method": "get",
            "responseCode": "201",
            "timestamp": "2019-05-01T00:00:30Z",
            "uri": "stream.example.com/subscribe"
        }
    ],
    "summaryStatistics": {}
}

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,apiusagedetails-by-time
version,1
source,apiusagedetails-by-time/versions/1
start,2023-03-01T00:00:00Z
end,2023-04-01T00:00:00Z
availableDataEnds,
suggestedRetryTime,
rowCount,4
objectType,account_id
objectIds,1-123A,1-1TGTG,1-1TJZFB
client_token,token_1,token_2
contract_type,1-3CV382,1-6T5ZND
endpoint,endpoint/1,endpoint/2
http_method,post,patch
response_class,3xx,5xx
response_code,500,100
response_status,success,error
url_contain,/shop,/about
url_end_with,.html,.jsp
url_exact_match,https://www.example.com/shop/index.html,https://www.example.com/about/index.html
url_match,https://www.example.com/shop,https://www.example.com/about
url_not_contain,/blog,/contact
url_not_end_with,.css,.pdf
url_not_match,https://www.example.com/blog,https://www.example.com/contact
url_not_start_with,email:,ftp:
url_start_with,http:,https:
username,username2,username3
#METADATA_END

#SUMMARYSTATISTICS_START

#SUMMARYSTATISTICS_END

#COLUMNS_START
clientId,clientIp,clientOwner,clientToken,method,responseCode,timestamp,uri
#COLUMNS_END

#DATA_START
client3,127.0.0.1,owner2,token3,delete,503,2019-05-01T00:00:10Z,example.com/static/html
client5,127.0.0.1,owner1,token2,patch,500,2019-05-01T00:00:25Z,data.example.com/upload/file
Other,Other,Other,Other,Other,Other,Other,Other
client2,0.0.0.0,owner2,token2,get,201,2019-05-01T00:00:30Z,stream.example.com/subscribe
#DATA_END

Get report details

This sample Get a report type operation gets the same information you need to run the apiusagedetails-by-time report as provided in this reference documentation, but available dynamically to your API client application.

GET /reporting-api/v1/reports/apiusagedetails-by-time/versions/1

Status 200 application/json

Response body:

{
    "name": "apiusagedetails-by-time",
    "description": "This report allows you to audit details of latest individual API calls for a given timeframe.",
    "businessObjectName": "account_id",
    "version": 1,
    "status": "DEPRECATED",
    "deprecated": true,
    "timeBased": false,
    "supportsPagination": false,
    "outputType": "FLAT",
    "requiredProducts": [
        "EDGECONTROL"
    ],
    "requiredRoles": [
        "IDM: API Clients - Admin Access"
    ],
    "available": true,
    "metrics": [
        {
            "name": "timestamp",
            "description": "Date and time of API request.",
            "label": "Timestamp",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "clientOwner",
            "description": "Username of client owner.",
            "label": "Client owner",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "clientIp",
            "description": "IP generating API request.",
            "label": "Client IP",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "clientId",
            "description": "ID of client generating API request.",
            "label": "Client ID",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "clientToken",
            "description": "Client token used for generating API request.",
            "label": "Client token",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "method",
            "description": "A request method indicating the action performed on a resource.",
            "label": "Method",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "uri",
            "description": "API request details.",
            "label": "URI",
            "unit": "STRING",
            "summaryStatistic": false
        },
        {
            "name": "responseCode",
            "description": "Response code for the API request.",
            "label": "Response code",
            "unit": "STRING",
            "summaryStatistic": false
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "filters": [
        {
            "name": "url_contain",
            "type": "string",
            "description": "URL contains the specified string.",
            "required": false
        },
        {
            "name": "url_not_contain",
            "type": "string",
            "description": "URL does not contain the specified string.",
            "required": false
        },
        {
            "name": "url_match",
            "type": "string",
            "description": "URL matches the specified string.",
            "required": false
        },
        {
            "name": "url_not_start_with",
            "type": "string",
            "description": "URL does not start with the specified string.",
            "required": false
        },
        {
            "name": "response_class",
            "type": "enum",
            "description": "A class of HTTP response status codes, from 0xx through 6xx. ",
            "values": [
                {
                    "value": "0xx",
                    "description": "An aborted action on the client side."
                },
                {
                    "value": "1xx",
                    "description": "An informational response, like Continue."
                },
                {
                    "value": "2xx",
                    "description": "A successful response."
                },
                {
                    "value": "3xx",
                    "description": "Success, but a redirect where the thing you want is somewhere else."
                },
                {
                    "value": "4xx",
                    "description": "Error, where there’s some problem with the client request."
                },
                {
                    "value": "5xx",
                    "description": "Error, where there’s some problem with how the API server responded to the client request. "
                },
                {
                    "value": "6xx",
                    "description": "Invalid headers (defined by Akamai)."
                }
            ],
            "required": false
        },
        {
            "name": "contract_type",
            "type": "string",
            "description": "Contract type.",
            "required": false
        },
        {
            "name": "username",
            "type": "string",
            "description": "Name of client generating API request.",
            "required": false
        },
        {
            "name": "url_not_end_with",
            "type": "string",
            "description": "URL does not end with the specified string.",
            "required": false
        },
        {
            "name": "endpoint",
            "type": "string",
            "description": "An API endpoint enabled by Akamai.",
            "required": false
        },
        {
            "name": "client_token",
            "type": "string",
            "description": "Client token used for generating API request.",
            "required": false
        },
        {
            "name": "url_exact_match",
            "type": "string",
            "description": "URL is an exact match for the specified string.",
            "required": false
        },
        {
            "name": "http_method",
            "type": "enum",
            "description": "A request method indicating the action performed on a resource.",
            "values": [
                {
                    "value": "head",
                    "description": "Retrieves header information about the target resource, with no message body in the response. "
                },
                {
                    "value": "other"
                },
                {
                    "value": "post",
                    "description": "Sends information to the server."
                },
                {
                    "value": "get",
                    "description": "Retrieves information about the target resource."
                },
                {
                    "value": "delete",
                    "description": "Removes all information about the target resource."
                },
                {
                    "value": "put",
                    "description": "Replaces existing information about the target resource."
                }
            ],
            "required": false
        },
        {
            "name": "response_code",
            "type": "string",
            "description": "An HTTP response status code, for example, 201.",
            "required": false
        },
        {
            "name": "url_not_match",
            "type": "string",
            "description": "URL does not match the specified string.",
            "required": false
        },
        {
            "name": "url_start_with",
            "type": "string",
            "description": "URL starts with the specified string.",
            "required": false
        },
        {
            "name": "url_end_with",
            "type": "string",
            "description": "URL ends with the specified string.",
            "required": false
        },
        {
            "name": "response_status",
            "type": "enum",
            "description": "An indicator of whether the HTTP response resulted in success or an error.",
            "values": [
                {
                    "value": "success",
                    "description": "Successful HTTP response status."
                },
                {
                    "value": "error",
                    "description": "Error HTTP response status.Y"
                }
            ],
            "required": false
        }
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY",
        "HOUR",
        "FIVE_MINUTES"
    ],
    "dataRetentionDays": 92,
    "limit": 5000,
    "maxLimit": 25000,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v1/reports/apiusagedetails-by-time/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/apiusagedetails-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/apiusagedetails-by-time/versions/1/report-data"
        }
    ]
}