actionstaken-by-time

The following shows how to generate the actionstaken-by-time report using either the Reporting API's Generate a report POST or the Get a cacheable report GET operations. 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, as shown in Get details. See also other available reports.

Report definition

Provides redirect, blocked and Akamai override hits.

You can configure the aggregation interval for each data record. Available interval values are: FIVE_MINUTES, HOUR, DAY, WEEK, MONTH.

Business object: cpcode

Data available for: 90 days

Required products: Enhanced Proxy Detection with GeoGuard

Available metrics

MetricDescription
Data metrics
blockedHitsTotalTotal Blocked Hits.
redirectHitsTotalTotal Redirect Hits.
akamaiOverrideTotal Total Akamai Override.
blockedHits Blocked Hits.
redirectHits Redirect Hits.
akamaiOverride Akamai Override.

Available filters

FilterTypeDescription
Optional filters
delivery_type_enhanced EnumerationDistinguishes secure from non-secure traffic.
secure_standard : Secure standard traffic.
non_secure: Non-secure traffic.
secure_shared : Secure shared traffic.
secure_premium : Secure premium traffic.
ip_versionEnumerationThe IP for which the report is shown
ipv4: IP address in v4 format.
ipv6: IP address in v6 format.
http_versionEnumerationHTTP version.
https1.1
http2
http3
http1.1
cpcodeStringContent Provider code.

POST request

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

Sample: /reporting-api/v1/reports/actionstaken-by-time/versions/1/report-data?start​=2019-10-08T13%3A40%3A00Z​&end​=2019-10-08T14%3A00%3A00Z​&interval​=FIVE_MINUTES

Query parameters

ParameterTypeSampleDescription
Required
startString2022-06-23T13:55: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.
endString2022-06-23T14:15: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.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: MONTH, WEEK, DAY, HOUR, FIVE_MINUTES.

JSON request members

MemberTypeDescription
objectIdsArray, EnumerationSpecifies the set of cpcode values you want to report on. As an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
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": ["123456", "654321"],
  "metrics": ["akamaiOverrideTotal"],
  "filters": {
      "ip_version": ["ipv4"]
  }
}

GET request

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

Sample: /reporting-api/v1/reports/actionstaken-by-time/versions/1/report-data?start​=2019-10-08T13%3A40%3A00Z​&end​=2019-10-08T14%3A00%3A00Z​&interval​=FIVE_MINUTES​&objectIds​=55232,​23433,​32433​&metrics​=edgeHitsPerSecond%2CedgeHitsPerSecondMax​&filters​=delivery_type%3Dsecure%2Cdelivery_type%3Dnon-secure%2Cip_version%3Dipv4%2Cip_version%3Dipv6

Query parameters

ParameterTypeSampleDescription
Required
startString2022-06-23T13:55: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.
endString2022-06-23T14:15: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.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: FIVE_MINUTES.
Optional
allObjectIdsBooleantrueAs an alternative to objectIds, enabling this generates a report that includes all IDs available for the cpcode objectType. This parameter is ignored if the request also specifies a set of objectIds.
objectIdsString55232,​23433,​32433As an alternative to allObjectIds, specifies the set of unique IDs for the cpcode objectType you want to report on, formatted as a comma-delimited list.
metricsStringakamaiOverrideTotal,​redirectHitsSpecifies 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.
filtersStringdelivery_type=​secure_premium,​delivery_type=​non-secure,​ip_version=​ipv4,​ip_version=​ipv6Specifies 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": "actionstaken-by-time",
        "version": "1",
        "outputType": "FLAT",
        "groupBy": [
            "startdatetime"
        ],
        "interval": "FIVE_MINUTES",
        "start": "2022-03-18T00:00:00Z",
        "end": "2022-03-19T00:00:00Z",
        "availableDataEnds": "2022-03-21T16:00:00Z",
        "suggestedRetryTime": null,
        "rowCount": 288,
        "filters": [],
        "columns": [
            {
                "name": "groupBy",
                "label": "startdatetime"
            },
            {
                "name": "blockedHits",
                "label": "Blocked Hits"
            },
            {
                "name": "redirectHits",
                "label": "Redirect Hits"
            },
            {
                "name": "akamaiOverride",
                "label": "Akamai Override"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "123456",
            "654321"
        ]
    },
    "data": [
        {
            "startdatetime": "2022-03-18T00:00:00Z",
            "akamaiOverride": "0",
            "blockedHits": "0",
            "redirectHits": "0"
        },
        {
            "startdatetime": "2022-03-18T23:55:00Z",
            "akamaiOverride": "0",
            "blockedHits": "0",
            "redirectHits": "0"
        }
    ],
    "summaryStatistics": {
        "akamaiOverrideTotal": {
            "value": "0",
            "details": {}
        },
        "blockedHitsTotal": {
            "value": "11",
            "details": {}
        },
        "redirectHitsTotal": {
            "value": "11",
            "details": {}
        }
    }
}

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,actionstaken-by-time
version,1
source,actionstaken-by-time/versions/1
groupBy,startdatetime
start,2022-03-18T00:00:00Z
end,2022-03-19T00:00:00Z
interval,FIVE_MINUTES
availableDataEnds,2022-03-21T16:00:00Z
suggestedRetryTime,
rowCount,288
objectType,cpcode
objectIds,123456,654321
#METADATA_END

#SUMMARYSTATISTICS_START
akamaiOverrideTotal,0
blockedHitsTotal,11
redirectHitsTotal,11
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,blockedHits,redirectHits,akamaiOverride
#COLUMNS_END

#DATA_START
2022-03-18T00:00:00Z,0,0,0
2022-03-18T00:05:00Z,0,0,0
2022-03-18T23:55:00Z,0,0,0
#DATA_END

Get report details

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

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

Status 200 application/json

Response body:

{
    "name": "actionstaken-by-time",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "internalOnly": false,
    "timeBased": true,
    "supportsPagination": false,
    "outputType": "FLAT",
    "requiredProducts": [
        "Enhanced Proxy Detection with GeoGuard"
    ],
    "requiredRoles": [
        "Reports - All privileges",
        "Reports - View only",
        "OTA App User"
    ],
    "available": true,
    "metrics": [
        {
            "name": "blockedHitsTotal",
            "label": "Total Blocked Hits",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "redirectHitsTotal",
            "label": "Total Redirect Hits",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "akamaiOverrideTotal",
            "label": "Total Akamai Override",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "blockedHits",
            "label": "Blocked Hits",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "redirectHits",
            "label": "Redirect Hits",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "akamaiOverride",
            "label": "Akamai Override",
            "unit": "COUNT",
            "summaryStatistic": false
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "startdatetime"
    ],
    "filters": [
        {
            "name": "ip_version",
            "type": "enum",
            "values": [
                {
                    "value": "ipv4"
                },
                {
                    "value": "ipv6"
                }
            ],
            "required": false
        },
        {
            "name": "http_version",
            "type": "enum",
            "values": [
                {
                    "value": "https1.1"
                },
                {
                    "value": "http2"
                },
                {
                    "value": "http3"
                },
                {
                    "value": "http1.1"
                }
            ],
            "required": false
        },
        {
            "name": "delivery_type_enhanced",
            "type": "enum",
            "values": [
                {
                    "value": "secure_shared"
                },
                {
                    "value": "secure_standard"
                },
                {
                    "value": "secure_premium"
                },
                {
                    "value": "non_secure"
                }
            ],
            "required": false
        }
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY",
        "HOUR",
        "FIVE_MINUTES"
    ],
    "dataRetentionDays": 90,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v1/reports/actionstaken-by-time/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/actionstaken-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/actionstaken-by-time/versions/1/report-data"
        }
    ]
}