bytes-by-ip report

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

Bytes returned by IP.

Business object: cpcode

Data available for: 92 days

Required products: Kona Site Defender, Download Delivery, OTA Updates, Web Application Protector, Wholesale Delivery, Adaptive Media Delivery, Dynamic Site Accelerator, Ion, Dynamic Site Delivery, Object Delivery, or Kona DDoS Defender

Available metrics

Metric Description
Data metrics
edgeBytes The volume for the amount of API traffic that left the Akamai network.

Sample report

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

Sample: /reporting-api/v1/reports/bytes-by-ip/versions/1/report-data?start=2020-05-01T00%3A00%3A00Z&end=2020-06-01T00%3A00%3A00Z

Object type: Query

Download schema: report-request-schema.json

Query parameters

Parameter Type Sample Description
Required
start String 2020-05-01T00:00:00Z Specifies 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.
end String 2020-06-01T00:00:00Z Specifies 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

Member Type Description
objectIds Array Specifies the set of cpcode values you want to report on.
objectIds Enumeration As an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required.
metrics Array The set of desired metrics. If omitted, the report includes all available metrics.

Request body:

{
    "objectIds": [
        "55232",
        "23433",
        "32433"
    ],
    "metrics": [
        "edgeBytes"
    ]
}

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

Sample: /reporting-api/v1/reports/bytes-by-ip/versions/1/report-data?start=2020-05-01T00%3A00%3A00Z&end=2020-06-01T00%3A00%3A00Z&objectIds=55232,23433,32433&metrics=edgeBytes

Query parameters

Parameter Type Sample Description
Required
start String 2020-05-01T00:00:00Z Specifies 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.
end String 2020-06-01T00:00:00Z Specifies if unavailable reports should be shown.
Optional
allObjectIds Boolean true As 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.
objectIds String 55232,23433,32433 As 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.
metrics String edgeBytes Specifies 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.

Status 200 application/json

Object type: Report

Download schema: report-response-schema.json

Response body:

{
    "metadata": {
        "name": "bytes-by-ip",
        "version": "1",
        "outputType": "FLAT",
        "groupBy": [
            "client_ip"
        ],
        "start": "2020-05-01T00:00:00Z",
        "end": "2020-06-01T00:00:00Z",
        "availableDataEnds": null,
        "suggestedRetryTime": null,
        "rowCount": 4,
        "filters": [],
        "columns": [
            {
                "name": "groupBy",
                "label": "client_ip"
            },
            {
                "name": "edgeBytes",
                "label": "Edge Bytes"
            }
        ],
        "objectType": "cpcode",
        "objectIds": [
            "55232",
            "23433",
            "32433"
        ]
    },
    "data": [
        {
            "client_ip": "250.250.250.250",
            "edgeBytes": "1745"
        },
        {
            "client_ip": "250.250.250.251",
            "edgeBytes": "2702"
        },
        {
            "client_ip": "250.250.250.252",
            "edgeBytes": "3287"
        },
        {
            "client_ip": "250.250.250.253",
            "edgeBytes": "1748"
        }
    ],
    "summaryStatistics": {}
}

Status 200 text/csv

Response Body:

#METADATA_START
name,bytes-by-ip
version,1
source,bytes-by-ip/versions/1
groupBy,client_ip
start,2020-05-01T00:00:00Z
end,2020-06-01T00:00:00Z
availableDataEnds,
suggestedRetryTime,
rowCount,4
objectType,cpcode
objectIds,55232,23433,32433
#METADATA_END

#SUMMARYSTATISTICS_START

#SUMMARYSTATISTICS_END

#COLUMNS_START
client_ip,edgeBytes
#COLUMNS_END

#DATA_START
250.250.250.250,1745
250.250.250.251,2702
250.250.250.252,3287
250.250.250.253,1748
#DATA_END

Get report details

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

GET /reporting-api/v1/reports/bytes-by-ip/versions/1

Status 200 application/json

Object type: ReportType

Download schema: data-row-schema.json

Response body:

{
    "name": "bytes-by-ip",
    "description": "Bytes returned by IP.",
    "businessObjectName": "cpcode",
    "version": 1,
    "status": "PUBLISHED",
    "deprecated": false,
    "timeBased": false,
    "outputType": "FLAT",
    "requiredProducts": [
        "Kona Site Defender",
        "Download Delivery",
        "OTA Updates",
        "Web Application Protector",
        "Wholesale Delivery",
        "Adaptive Media Delivery",
        "Dynamic Site Accelerator",
        "Ion",
        "Dynamic Site Delivery",
        "Object Delivery",
        "Kona DDoS Defender"
    ],
    "requiredRoles": [
        "Reports - All privileges",
        "Reports - View only",
        "OTA App User"
    ],
    "available": true,
    "metrics": [
        {
            "name": "edgeBytes",
            "description": "The volume for the amount of API traffic that left the Akamai network.",
            "label": "Edge Bytes",
            "unit": "BYTE",
            "summaryStatistic": false
        }
    ],
    "groupOutlyingValues": {
        "enabled": false
    },
    "groupBy": [
        "client_ip"
    ],
    "intervals": [
        "MONTH",
        "WEEK",
        "DAY"
    ],
    "dataRetentionDays": 92,
    "limit": 25,
    "links": [
        {
            "rel": "self",
            "href": "/reporting-reports-executor-api/v1/reports/bytes-by-ip/versions/1"
        },
        {
            "rel": "versions",
            "href": "/reporting-reports-executor-api/v1/reports/bytes-by-ip/versions"
        },
        {
            "rel": "all-reports",
            "href": "/reporting-reports-executor-api/v1/reports"
        },
        {
            "rel": "execute-report",
            "href": "/reporting-reports-executor-api/v1/reports/bytes-by-ip/versions/1/report-data"
        }
    ]
}