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

The methodology used to calculate the carbon emissions information is believed to be accurate. However, no responsibility for either the accuracy of the information or the precision of the methodology will be assumed, and no liability for any decisions made or actions taken in reliance on the report will be accepted. For more details, see the report documentation.

This report gives you the usage traffic by hits and bytes for all ​Akamai​ products served from a designated server location. If multiple products are assigned to a selected CP code, it is not possible to filter data by a single product only. For example, you can't show data for API Acceleration only.

Report definition

Provides traffic volume and calculated carbon emissions data for ​Akamai​ CDN.

Data available for: 400 days

Available metrics

Metric nameDescriptionConfiguration
edgeBytesSumThe total volume of edge traffic for given filters.type: LONG,
filterable: true,
mandatory: false
edgeHitsSumThe total number of edge requests for given filters.type: LONG,
filterable: true,
mandatory: false
calculatedEmissionsGramsCalculated emissions in grams.type: LONG,
filterable: true,
mandatory: false

Available dimensions

Dimension nameDescriptionConfiguration
cpcodeContent provider (CP) code.type: LONG,
filterable: true,
mandatory: false,
filterType: TEXT,
authorizable: true
time1dayDatapoint timestamp for 1 day granularity.type: LONG,
filterable: true,
mandatory: false,
filterType: TEXT,
authorizable: false
deliveryTypeDistinguishes secure from non-secure traffic.type: STRING,
filterable: true,
mandatory: false,
filterType: ENUM,
filterEnumValues: non_secure, secure,
authorizable: false
countryThe country or area generating traffic. For example, US.type: STRING,
filterable: true,
mandatory: false,
filterType: ENUM,
filterEnumValues:
see the report metadata.
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/traffic/emissions/data?timeRange=LAST_1_WEEK

Available time ranges

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

  • LAST_1_DAY

  • LAST_2_DAYS

  • LAST_1_WEEK

  • LAST_30_DAYS

  • LAST_90_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 metadata. See how to use filters.

Request body example

{
   "dimensions": [
       "time1day",
       "country",
       "deliveryType"
   ],
   "metrics": [
       "calculatedEmissionsGrams",
       "edgeBytesSum"
   ],
   "filters": [
       {
           "dimensionName": "cpcode",
           "operator": "IN_LIST",
           "expressions": [
               "909500"
           ]
       },
       {
          "metricName": "edgeBytesSum",
          "operator": "GREATER_THAN",
          "expression": "2"
       }
   ],
   "sortBys": [
       {
           "name": "calculatedEmissionsGrams",
           "sortOrder": "DESCENDING"
       }
   ],
   "limit": 1000
}

Default values

The following values are the defaults for all requests. It means that they are used unless you explicitly set other values in the request.

  • Time range:

    • start. Now - 2 days
    • end. Now
  • Metrics:

    • edgeBytesSum
    • calculatedEmissionsGrams
  • Filters:

    • cpcode. You can use all CP codes to which you are authorized in ​Control Center​. If you don't specify any CP codes in your request, the report shows data for all your available CP codes.

Limits

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

SettingLimit
Maximum number of dimensions4
Maximum time range400 days
Maximum retention of historic data400 days
Maximum length of value for TEXT filters100
Maximum number of data points returned50000

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/traffic/emissions

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

{
    "name": "CDN emissions report data",
    "description": "Provides CDN traffic hits, volume and calculated carbon emissions data.",
    "status": "PUBLISHED",
    "metrics": [
        {
            "name": "edgeBytesSum",
            "description": "The total volume of edge traffic for given filters.",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "edgeHitsSum",
            "description": "The total number of edge requests for given filters.",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        },
        {
            "name": "calculatedEmissionsGrams",
            "description": "Calculated emissions in grams.",
            "type": "LONG",
            "filterable": true,
            "mandatory": false
        }
    ],
    "dimensions": [
        {
            "name": "time1day",
            "description": "Datapoint timestamp for 1 day granularity.",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": false
        },
        {
            "name": "cpcode",
            "description": "Content provider (CP) code.",
            "type": "LONG",
            "filterable": true,
            "mandatory": false,
            "filterType": "TEXT",
            "authorizable": true
        },
        {
            "name": "deliveryType",
            "description": "Distinguishes secure from non-secure traffic.",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "non_secure",
                "secure"
            ],
            "authorizable": false
        },
        {
            "name": "country",
            "description": "The country or area generating traffic. For example, US.",
            "type": "STRING",
            "filterable": true,
            "mandatory": false,
            "filterType": "ENUM",
            "filterEnumValues": [
                "AD",
                "AE",
                "AF",
                "AG",
                "AI",
                "AL",
                "AM",
                "AO",
                "AQ",
                "AR",
                "AS",
                "AT",
                "AU",
                "AW",
                "AZ",
                "BA",
                "BB",
                "BD",
                "BE",
                "BF",
                "BG",
                "BH",
                "BI",
                "BJ",
                "BL",
                "BM",
                "BN",
                "BO",
                "BQ",
                "BR",
                "BS",
                "BT",
                "BV",
                "BW",
                "BY",
                "BZ",
                "CA",
                "CC",
                "CD",
                "CF",
                "CG",
                "CH",
                "CI",
                "CK",
                "CL",
                "CM",
                "CN",
                "CO",
                "CR",
                "CU",
                "CV",
                "CW",
                "CX",
                "CY",
                "CZ",
                "DE",
                "DJ",
                "DK",
                "DM",
                "DO",
                "DZ",
                "EC",
                "EE",
                "EG",
                "EH",
                "ER",
                "ES",
                "ET",
                "EU",
                "FI",
                "FJ",
                "FK",
                "FM",
                "FO",
                "FR",
                "GA",
                "GB",
                "GD",
                "GE",
                "GF",
                "GG",
                "GH",
                "GI",
                "GL",
                "GM",
                "GN",
                "GP",
                "GQ",
                "GR",
                "GS",
                "GT",
                "GU",
                "GW",
                "GY",
                "HK",
                "HM",
                "HN",
                "HR",
                "HT",
                "HU",
                "ID",
                "IE",
                "IL",
                "IM",
                "IN",
                "IO",
                "IQ",
                "IR",
                "IS",
                "IT",
                "JE",
                "JM",
                "JO",
                "JP",
                "KE",
                "KG",
                "KH",
                "KI",
                "KM",
                "KN",
                "KP",
                "KR",
                "KW",
                "KY",
                "KZ",
                "LA",
                "LB",
                "LC",
                "LI",
                "LK",
                "LR",
                "LS",
                "LT",
                "LU",
                "LV",
                "LY",
                "MA",
                "MC",
                "MD",
                "ME",
                "MF",
                "MG",
                "MH",
                "MK",
                "ML",
                "MM",
                "MN",
                "MO",
                "MP",
                "MQ",
                "MR",
                "MS",
                "MT",
                "MU",
                "MV",
                "MW",
                "MX",
                "MY",
                "MZ",
                "NA",
                "NC",
                "NE",
                "NF",
                "NG",
                "NI",
                "NL",
                "NO",
                "NP",
                "NR",
                "NU",
                "NZ",
                "OM",
                "PA",
                "PE",
                "PF",
                "PG",
                "PH",
                "PK",
                "PL",
                "PM",
                "PN",
                "PR",
                "PS",
                "PT",
                "PW",
                "PY",
                "QA",
                "RE",
                "RO",
                "RS",
                "RU",
                "RW",
                "SA",
                "SB",
                "SC",
                "SD",
                "SE",
                "SG",
                "SH",
                "SI",
                "SJ",
                "SK",
                "SL",
                "SM",
                "SN",
                "SO",
                "SR",
                "SS",
                "ST",
                "SV",
                "SX",
                "SY",
                "SZ",
                "TC",
                "TD",
                "TF",
                "TG",
                "TH",
                "TJ",
                "TK",
                "TL",
                "TM",
                "TN",
                "TO",
                "TR",
                "TT",
                "TV",
                "TW",
                "TZ",
                "UA",
                "UG",
                "UM",
                "US",
                "UY",
                "UZ",
                "VA",
                "VC",
                "VE",
                "VG",
                "VI",
                "VN",
                "VU",
                "WF",
                "WS",
                "YE",
                "YT",
                "ZA",
                "ZM",
                "ZW"
            ],
            "authorizable": false
        }
    ],
    "predefinedTimeRanges": [
        "LAST_1_DAY",
        "LAST_2_DAYS",
        "LAST_1_WEEK",
        "LAST_30_DAYS",
        "LAST_90_DAYS"
    ],
    "defaults": {
        "defaultTimeRange": {
            "start": "now - 2 days",
            "end": "now"
        },
        "defaultMetrics": [
            "edgeBytesSum",
            "calculatedEmissionsGrams"
        ]
    },
    "limits": {
        "maxDimensions": 4,
        "maxDateRangeInDays": 400,
        "maxRetentionInDays": 400,
        "textFilterMaxLength": 100,
        "dataPointsLimit": 50000
    },
    "links": [
        {
            "rel": "self",
            "href": "/reporting-api/v2/reports/delivery/traffic/emissions",
            "describedBy": "/reporting-api/v2/reports/schema",
            "allow": [
                "GET"
            ]
        },
        {
            "rel": "data",
            "href": "/reporting-api/v2/reports/delivery/traffic/emissions/data",
            "allow": [
                "POST"
            ]
        }
    ]
}