The following shows how to generate the delivery/purge/usage report with the Generate a report POST operation of the Reporting API v2. See also other available reports.

Report definition

Provides details of purge requests.

Data available for: 45 days

Available metrics

Metric nameDescriptionConfiguration
objectsCountNumber of purge objects.type: LONG
filterable: true
mandatory: false
objectsPercentagePercentage of purge objects.type: DOUBLE
filterable: true
mandatory: false
requestsCountNumber of purge requests.type: LONG
filterable: true
mandatory: false
requestsPercentagePercentage of purge requests.type: DOUBLE
filterable: true
mandatory: false

Available dimensions

Dimension nameDescriptionConfiguration
contractTypeContract type identifier associated with an API client.type: STRING
filterable: true
mandatory: false
filterType: TEXT
authorizable: true
accountIdCustomer account identifier linked to a purge request.type: STRING
filterable: true
mandatory: false
filterType: TEXT
authorizable: true
time5minutesDatapoint timestamp for 5 minutes granularity.type: TIMESTAMP_SEC
filterable: false
mandatory: false
filterType: TEXT
authorizable: false
time1hourDatapoint timestamp for 1 hour granularity.type: TIMESTAMP_SEC
filterable: false
mandatory: false
filterType: TEXT
authorizable: false
time1dayDatapoint timestamp for 1 day granularity.type: TIMESTAMP_SEC
filterable: false
mandatory: false
filterType: TEXT
authorizable: false
clientIdIdentifier of an API client generating a purge request.type: STRING
filterable: true
mandatory: false
filterType: TEXT
authorizable: false
clientNameName given to an API client by the user who creates it. It is applicable to service accounts.type: STRING
filterable: true
mandatory: false
filterType: TEXT
authorizable: false
clientOwnerExternally visible customer username of an API client associated with a purge request.type: STRING
filterable: true
mandatory: false
filterType: TEXT
authorizable: false
requestActionPurge action desired on objects in a purge request, either UNDO, INVALIDATE, or DELETE.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: INVALIDATE, DELETE, UNDO
authorizable: false
requestSourceSource of a purge request. For example, PORTAL.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: PORTAL, EDGEGRID, LOCAL, LEGACY
authorizable: false
requestTypeType of objects in a purge request. For example, ARL.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: URL, ARL, CPCODE, VCD, TAG
authorizable: false
environmentEnvironment to which a purge request applies, either PRODUCTION or STAGING.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: STAGING, PRODUCTION
authorizable: false
responseStatusIndicates whether an HTTP request resulted in a success or an error.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: error, success
authorizable: false
responseClassClass of HTTP response status codes. For example, 2xx.type: STRING
filterable: true
mandatory: false
filterType: ENUM
filterEnumValues: 0xx, 1xx, 2xx, 3xx, 4xx, 5xx, 6xx, other
authorizable: false
responseCodeResponse code for an API request. For example, 200.type: LONG
filterable: true
mandatory: false
filterType: TEXT
authorizable: false

Generate a report

Use the Generate a report POST operation to execute a report.

Follow the API workflows to:

POST request sample

POST /reporting-api/v2/reports/delivery/purge/usage/data?timeRange=LAST_1_HOUR

Available time ranges

For this report, you can use these predefined ranges in the timeRange query parameter:

  • LAST_1_HOUR

  • LAST_1_DAY

  • LAST_2_DAYS

  • LAST_1_WEEK

  • LAST_30_DAYS

Supported filters

This report supports filtering by dimensions and metrics.

You can filter by each dimension or metric that is labeled as filterable: true in the report options. See how to use filters.

Request body example

{
    "dimensions": [
        "time1day",
        "responseCode",
        "requestType",
        "time5minutes"
    ],
    "metrics": [
        "objectsCount",
        "objectsPercentage",
        "requestsCount",
        "requestsPercentage"
    ],
    "filters": [
        {
            "dimensionName": "contractType",
            "operator": "IN_LIST",
            "expressions": [
                "1-6T5ZND"
            ]
        },
        {
            "dimensionName": "responseClass",
            "operator": "IN_LIST",
            "expressions": [
                "1xx",
                "0xx"
            ]
        },
        {
            "metricName": "requestsCount",
            "operator": "EQUAL",
            "expression": 1907
        },
        {
            "metricName": "objectsPercentage",
            "operator": "NOT_EQUAL",
            "expression": 50
        }
    ],
    "sortBys": [
        {
            "name": "requestsCount",
            "sortOrder": "ASCENDING"
        }
    ],
    "limit": 1000
}

Default values

These default values apply to all requests, meaning they are used unless you specify otherwise.

  • Time range:

    • start = now - 1 hour
    • end = now
  • Metrics:

    • objectsCount
    • requestsCount
  • Dimensions:

    • time5minutes
    • responseCode
  • Filters:

    • contractType. You can use all contract types to which you are authorized in ​Control Center​. If you don't specify any contract types in your request, the report shows data for all your available contract types.
    • accountId. You can use all account IDs to which you are authorized in ​Control Center​. If you don't specify any account ID in your request, the report shows data for all your available account IDs.
  • SortBys:

    • time5minutes, DESCENDING

Limits

Each report has some configured limits. If your request has values that exceed the limits, it results in an HTTP 400 Bad Request response. This report has the following limits:

SettingLimit
Maximum number of dimensions4
Maximum time range45 days
Maximum retention of historic data45 days
Maximum length of value for TEXT filters100
Maximum number of data points returned25000

Rate limiting

This report uses both cost-based and hit-based rate limiting. For the hit-based rate limiting, the limit for an account is 10 requests per minute.

In the asynchronous flow, you can have 3 queued POST requests at the same time.

Read more about the rate limiting.

Get report options

To get the report metadata through the API, run the Get report options operation.

GET /reporting-api/v2/reports/delivery/purge/usage

The response shows the list of available metrics and dimensions, the default values, and configured limits.

{
    "name": "Purge usage report data",
    "status": "PUBLISHED",
    "metrics": [
        {
            "name": "objectsCount",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "objectsPercentage",
            "type": "DOUBLE",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "requestsCount",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "requestsPercentage",
            "type": "DOUBLE",
            "filterable": true,
            "mandatory": false
        }
    ],
    "dimensions": [
        {
            "name": "contractType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": true
        },
        {
            "name": "accountId",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": true
        },
        {
            "name": "time5minutes",
            "type": "TIMESTAMP_SEC",
            "filterable": false,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "time1hour",
            "type": "TIMESTAMP_SEC",
            "filterable": false,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "time1day",
            "type": "TIMESTAMP_SEC",
            "filterable": false,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "clientId",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "clientName",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "clientOwner",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "requestAction",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "INVALIDATE",
                "DELETE",
                "UNDO"
            ],
            "authorizable": false
        },
        {
            "name": "requestSource",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "PORTAL",
                "EDGEGRID",
                "LOCAL",
                "LEGACY"
            ],
            "authorizable": false
        },
        {
            "name": "requestType",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "URL",
                "ARL",
                "CPCODE",
                "VCD",
                "TAG"
            ],
            "authorizable": false
        },
        {
            "name": "environment",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "STAGING",
                "PRODUCTION"
            ],
            "authorizable": false
        },
        {
            "name": "responseStatus",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "error",
                "success"
            ],
            "authorizable": false
        },
        {
            "name": "responseClass",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "0xx",
                "1xx",
                "2xx",
                "3xx",
                "4xx",
                "5xx",
                "6xx",
                "other"
            ],
            "authorizable": false
        },
        {
            "name": "responseCode",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        }
    ],
    "predefinedTimeRanges": [
        "LAST_1_HOUR",
        "LAST_1_DAY",
        "LAST_2_DAYS",
        "LAST_1_WEEK",
        "LAST_30_DAYS"
    ],
    "defaults": {
        "defaultTimeRange": {
            "start": "now - 1 hour",
            "end": "now"
        },
        "defaultMetrics": [
            "objectsCount",
            "requestsCount"
        ],
        "defaultDimensions": [
            "time5minutes",
            "responseCode"
        ],
        "defaultSortBys": [
            {
                "name": "time5minutes",
                "sortOrder": "DESCENDING"
            }
        ]
    },
    "limits": {
        "maxDimensions": 4,
        "maxDateRangeInDays": 45,
        "maxRetentionInDays": 45,
        "textFilterMaxLength": 100,
        "dataPointsLimit": 25000
    },
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v2/reports/delivery/purge/usage",
            "describedBy": "/reporting-api/v2/reports/schema",
            "allow": [
                "GET"
            ]
        },
        {
            "rel": "data",
            "href": "/reporting-api/v2/reports/delivery/purge/usage/data",
            "allow": [
                "POST"
            ]
        }
    ]
}