proxytraffic-by-time

This shows how to generate the proxytraffic-by-time report with 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 Edge proxy hits, applied matches and actions taken data.

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

Available metrics

MetricDescription
Data metrics
edgeProxyHitsTotal Total edge proxy hits.
appliedMatchesTotal Total applied matches.
actionsTakenTotal Total actions taken.
edgeProxyHits Edge proxy hits.
appliedMatches Applied matches.
actionsTaken Actions taken.

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/proxytraffic-by-time/versions/1/report-data{?start,​end,​interval}

Sample: /reporting-api/v1/reports/proxytraffic-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
startString2019-10-08T13:40: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.
endString2019-10-08T14:00:00ZSpecifies if unavailable reports should be shown.
intervalEnumerationFIVE_MINUTESThe duration of each data record. Available values: FIVE_MINUTES, HOUR, DAY, WEEK, MONTH.

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": ["edgeProxyHits"],
  "filters": {
      "delivery_type_enhanced": ["non_secure"]
  }
}

GET request

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

Sample: /reporting-api/v1/reports/proxytraffic-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
startString2019-10-08T13:40: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.
endString2019-10-08T14:00:00ZSpecifies if unavailable reports should be shown.
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.
metricsStringedgeProxyHitsTotal,​appliedMatchesSpecifies 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,​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": "proxytraffic-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-21T15:00:00Z",
        "suggestedRetryTime": null,
        "rowCount": 288,
        "filters": [],
        "columns": [
            {
                "name": "groupBy",
                "label": "startdatetime"
            },
           {
                "name": "edgeProxyHits",
                "label": "Edge Proxy Hits"
            },
            {
                "name": "appliedMatches",
                "label": "Applied Matches"
            },
            {
                "name": "actionsTaken",
                "label": "Actions Taken"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "123456",
            "654321"
        ]
    },
    "data": [
        {
            "startdatetime": "2022-03-18T00:00:00Z",
            "actionsTaken": "0",
            "appliedMatches": "0",
            "edgeProxyHits": "0"
        },
        {
            "startdatetime": "2022-03-18T23:55:00Z",
            "actionsTaken": "0",
            "appliedMatches": "0",
            "edgeProxyHits": "0"
        }
    ],
    "summaryStatistics": {
        "actionsTakenTotal": {
            "value": "22",
            "details": {}
        },
        "appliedMatchesTotal": {
            "value": "39",
            "details": {}
        },
        "edgeProxyHitsTotal": {
            "value": "39",
            "details": {}
        }
    }
}

CSV response

Status 200 text/csv

Response Body:

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

#SUMMARYSTATISTICS_START
actionsTakenTotal,22
appliedMatchesTotal,39
edgeProxyHitsTotal,39
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,edgeProxyHits,appliedMatches,actionsTaken
#COLUMNS_END

#DATA_START
2022-03-18T00:00: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/proxytraffic-by-time/versions/1

Status 200 application/json

Response body:

{
    "name": "proxytraffic-by-time",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "internalOnly": false,
    "timeBased": true,
    "supportsPagination": false,
    "outputType": "FLAT",
    "requiredProducts": [
        "Basic Traffic Reports"
    ],
    "requiredRoles": [
        "Reports - All privileges",
        "Reports - View only",
        "OTA App User"
    ],
    "available": true,
    "metrics": [
         {
            "name": "edgeProxyHitsTotal",
            "label": "Total Edge Proxy Hits",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "appliedMatchesTotal",
            "label": "Total Applied Matches",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "actionsTakenTotal",
            "label": "Total Actions Taken",
            "unit": "COUNT",
            "summaryStatistic": true
        },
        {
            "name": "edgeProxyHits",
            "label": "Edge Proxy Hits",
            "unit": "COUNT",
            "summaryStatistic": false
        },
       {
            "name": "appliedMatches",
            "label": "Applied Matches",
            "unit": "COUNT",
            "summaryStatistic": false
        },
        {
            "name": "actionsTaken",
            "label": "Actions Taken",
            "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/proxytraffic-by-time/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/proxytraffic-by-time/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/proxytraffic-by-time/versions/1/report-data"
        }
    ]
}