urlbytes-by-url

The following shows how to generate the urlbytes-by-url 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

Returns volume data by URL. You can fetch the top 25k URLs via API.

Business object: cpcode

Data available for: 92 days

Available metrics

MetricDescription
Data metrics
allBytesOffloadThe total volume that was served by Akamai as a percentage of total volume served for given objects and filters.
allEdgeBytesThe total volume that was served by Akamai to the end user.
allOriginBytesThe total volume that was served by the origin.

Available filters

FilterTypeDescription
Optional filters
delivery_typeEnumerationDistinguishes secure from non-secure traffic.
secure: Secure traffic.
non_secure: Non-secure traffic.
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.

ūüďė

The use of negative filters

For this report, the negative filters, such as url_not_start_with or url_not_contain, use the OR logic, which means you can only use one filter value at a time. Otherwise, the filters may not work in the expected way.

POST request

POST /reporting-api/v1/reports/urlbytes-by-url/versions/1/report-data{?start,‚Äčend}

Sample: /reporting-api/v1/reports/urlbytes-by-url/versions/1/report-data?start‚Äč=2020-05-01T00%3A00%3A00Z‚Äč&end‚Äč=2020-06-01T00%3A00%3A00Z

Query parameters

ParameterTypeSampleDescription
Required
startString2020-05-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.
endString2020-06-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 cpcode values you want to report on.
objectIdsEnumerationAs 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.
limitNumberThis numeric parameter is optional, by default 500, and not greater than 25000.

Request body:

{
    "objectIds": [
        "55232",
        "23433",
        "32433"
    ],
    "metrics": [
        "allBytesOffload",
        "allEdgeBytes",
        "allOriginBytes"
    ],
    "filters": {
        "delivery_type": [
            "secure",
            "non-secure"
        ],
        "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",
            ".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:"
        ]
    }
}

GET request

GET /reporting-api/v1/reports/urlbytes-by-url/versions/1/report-data{?start,‚Äčend,‚ÄčobjectIds,‚ÄčallObjectIds,‚Äčmetrics,‚Äčfilters}

Sample: /reporting-api/v1/reports/urlbytes-by-url/versions/1/report-data?start‚Äč=2020-05-01T00%3A00%3A00Z‚Äč&end‚Äč=2020-06-01T00%3A00%3A00Z‚Äč&objectIds‚Äč=55232,‚Äč23433,‚Äč32433‚Äč&metrics‚Äč=allBytesOffload%2CallEdgeBytes‚Äč&filters‚Äč=delivery_type%3Dsecure%2Cdelivery_type%3Dnon-secure%2Curl_contain%3D%2Fshop%2Curl_contain%3D%2Fabout

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.
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.
metricsStringallBytesOffload,‚ÄčallEdgeBytesSpecifies 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,‚Äčurl_contain=/shop,‚Äčurl_contain=/aboutSpecifies 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.
limitNumberThis numeric parameter is optional, by default 500, and not greater than 25000.

JSON response

Status 200 application/json

Response body:

{
    "metadata": {
        "name": "urlbytes-by-url",
        "version": "1",
        "outputType": "FLAT",
        "groupBy": [
            "hostname.url"
        ],
        "start": "2020-05-01T00:00:00Z",
        "end": "2020-06-01T00:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [
            {
                "name": "delivery_type",
                "values": [
                    "secure",
                    "non-secure"
                ]
            },
            {
                "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": [
                    ".doc",
                    ".js"
                ]
            },
            {
                "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:"
                ]
            }
        ],
        "columns": [
            {
                "name": "groupBy",
                "label": "hostname.url"
            },
            {
                "name": "allBytesOffload",
                "label": "Offload"
            },
            {
                "name": "allEdgeBytes",
                "label": "Edge Bytes"
            },
            {
                "name": "allOriginBytes",
                "label": "Origin Bytes"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "55232",
            "23433",
            "32433"
        ]
    },
    "data": [
        {
            "hostname.url": "stream.example.com/live",
            "allBytesOffload": "85",
            "allEdgeBytes": "475",
            "allOriginBytes": "2060"
        },
        {
            "hostname.url": "example.com/static/css",
            "allBytesOffload": "28",
            "allEdgeBytes": "657",
            "allOriginBytes": "2359"
        },
        {
            "hostname.url": "stream.example.com/subscribe",
            "allBytesOffload": "58",
            "allEdgeBytes": "1299",
            "allOriginBytes": "3251"
        },
        {
            "hostname.url": "data.example.com/download/file",
            "allBytesOffload": "12",
            "allEdgeBytes": "313",
            "allOriginBytes": "3504"
        }
    ],
    "summaryStatistics": {}
}

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,‚Äčurlbytes-by-url
version,‚Äč1
source,‚Äčurlbytes-by-url/versions/1
groupBy,‚Äčhostname.url
start,‚Äč2020-05-01T00:00:00Z
end,‚Äč2020-06-01T00:00:00Z
availableDataEnds,
suggestedRetryTime,
rowCount,‚Äč4
objectType,‚Äčcpcode
objectIds,‚Äč55232,‚Äč23433,‚Äč32433
delivery_type,‚Äčsecure,‚Äčnon-secure
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,.doc,.js
url_not_match,‚Äčhttps://www.example.com/blog,‚Äčhttps://www.example.com/contact
url_not_start_with,‚Äčemail:,ftp:
url_start_with,‚Äčhttp:,https:
#METADATA_END

#SUMMARYSTATISTICS_START

#SUMMARYSTATISTICS_END

#COLUMNS_START
hostname.url,‚ÄčallBytesOffload,‚ÄčallEdgeBytes,‚ÄčallOriginBytes
#COLUMNS_END

#DATA_START
stream.example.com/live,‚Äč85,‚Äč475,‚Äč2060
example.com/static/css,‚Äč28,‚Äč657,‚Äč2359
stream.example.com/subscribe,‚Äč58,‚Äč1299,‚Äč3251
data.example.com/download/file,‚Äč12,‚Äč313,‚Äč3504
#DATA_END

Get report details

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

GET /reporting-api/v1/reports/urlbytes-by-url/versions/1

Status 200 application/json

Response body:

{
    "name": "urlbytes-by-url",
    "description": "Returns volume data by URL. You can fetch the top 25k URLs via API.",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "timeBased": false,
    "outputType": "FLAT",
    "requiredProducts": [
        "Basic Traffic Reports"
    ],
    "requiredRoles": [
        "Reports - All privileges",
        "Reports - View only",
        "OTA App User"
    ],
    "available": true,
    "metrics": [
        {
            "name": "allBytesOffload",
            "description": "The total volume that was served by Akamai as a percentage of total volume served for given objects and filters.",
            "label": "Offload",
            "unit": "RATIO",
            "summaryStatistic": false
        },
        {
            "name": "allEdgeBytes",
            "description": "The total volume that was served by Akamai to the end user.",
            "label": "Edge Bytes",
            "unit": "BYTE",
            "summaryStatistic": false
        },
        {
            "name": "allOriginBytes",
            "description": "The total volume that was served by the origin.",
            "label": "Origin Bytes",
            "unit": "BYTE",
            "summaryStatistic": false
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "hostname.url"
    ],
    "filters": [
        {
            "name": "url_exact_match",
            "type": "string",
            "description": "URL is an exact match for the specified string. ",
            "required": false
        },
        {
            "name": "url_not_end_with",
            "type": "string",
            "description": "URL does not end with the specified string.",
            "required": false
        },
        {
            "name": "url_contain",
            "type": "string",
            "description": "URL contains the specified string.",
            "required": false
        },
        {
            "name": "url_end_with",
            "type": "string",
            "description": "URL ends with the specified string.",
            "required": false
        },
        {
            "name": "url_match",
            "type": "string",
            "description": "URL matches the specified string. ",
            "required": false
        },
        {
            "name": "url_not_contain",
            "type": "string",
            "description": "URL does not contain the specified string. ",
            "required": false
        },
        {
            "name": "url_not_start_with",
            "type": "string",
            "description": "URL does not start with the specified string.",
            "required": false
        },
        {
            "name": "url_start_with",
            "type": "string",
            "description": "URL starts with the specified string.",
            "required": false
        },
        {
            "name": "url_not_match",
            "type": "string",
            "description": "URL does not match the specified string.",
            "required": false
        },
        {
            "name": "delivery_type",
            "type": "enum",
            "description": "Distinguishes secure from non-secure traffic.",
            "values": [
                {
                    "value": "secure",
                    "description": "Secure traffic."
                },
                {
                    "value": "non_secure",
                    "description": "Non-secure traffic."
                }
            ],
            "required": false
        }
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY"
    ],
    "dataRetentionDays": 92,
    "limit": 500,
    "maxLimit": 25000,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v1/reports/urlbytes-by-url/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-api/v1/reports/urlbytes-by-url/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-api/v1/reports/urlbytes-by-url/versions/1/report-data"
        }
    ]
}