carbondata-by-time

📘

The carbondata-by-time report is being discontinued

This report is deprecated and will be deactivated on January 16, 2025. As an alternative, use the new delivery/traffic/emissions report, based on the Reporting API v2.

The following shows how to generate the carbondata-by-time 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.

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 report documentation.

Report definition

Provides traffic volume and carbon calculated emissions data.

This report allows you to configure the aggregation interval for each data record. Available interval values are: DAY.

Business object: cpcode

Data available for: 92 days

Available metrics

MetricDescription
Data metrics
edgeBytesTotal The total volume of edge traffic for given objects and filters.
calculatedEmissionsGramsTotalTotal calculated emissions in grams.
edgeBytesThe volume for the amount of API traffic that left the Akamai network.
calculatedEmissionsGramsCalculated emissions in grams.

Available filters

FilterTypeDescription
Optional filters
delivery_typeEnumerationDistinguishes secure from non-secure traffic.
secure: Secure traffic.
non_secure: Non-secure traffic.
cpcodeStringContent Provider code.
country EnumerationCountry/area, for example, "PL".

POST request

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

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

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.
intervalEnumerationDAYThe duration of each data record. Available values: DAY.

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": ["edgeBytes"],
    "filters": {
        "country": ["US"]
    }
}

GET request

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

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

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.
intervalEnumerationDAYThe duration of each data record. Available values: DAY.
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.
metricsStringedgeBytesTotal,​calculatedEmissionsGramsTotalSpecifies 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,​country=PLSpecifies 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": "carbondata-by-time",
    "version": "1",
    "outputType": "FLAT",
    "groupBy": [
      "startdatetime"
    ],
    "interval": "DAY",
    "start": "2022-03-01T00:00:00Z",
    "end": "2022-03-14T00:00:00Z",
    "availableDataEnds": "2022-03-21T20:00:00Z",
    "suggestedRetryTime": null,
    "rowCount": 13,
    "filters": [],
    "columns": [
      {
        "name": "groupBy",
        "label": "startdatetime"
      },
      {
        "name": "calculatedEmissionsGrams",
        "label": "Calculated emissions in grams"
      },
      {
        "name": "edgeBytes",
        "label": "Edge Bytes"
      }
    ],
    "objectType": "cpcode",
    "objectIds": [
      "3310851",
      "3310852",
      "3310853",
      "3310854"
    ]
  },
  "data": [
    {
      "startdatetime": "2022-03-01T00:00:00Z",
      "calculatedEmissionsGrams": "7.38776819156440300000000000000000",
      "edgeBytes": "414566872650"
    },
    {
      "startdatetime": "2022-03-02T00:00:00Z",
      "calculatedEmissionsGrams": "12.97413360931569500000000000000000",
      "edgeBytes": "718528661250"
    },
    {
      "startdatetime": "2022-03-03T00:00:00Z",
      "calculatedEmissionsGrams": "13.47185359078994900000000000000000",
      "edgeBytes": "755990228623"
    },
    {
      "startdatetime": "2022-03-04T00:00:00Z",
      "calculatedEmissionsGrams": "13.85226453686124000000000000000000",
      "edgeBytes": "763334531816"
    },
    {
      "startdatetime": "2022-03-05T00:00:00Z",
      "calculatedEmissionsGrams": "13.17376708101081400000000000000000",
      "edgeBytes": "739255133376"
    },
    {
      "startdatetime": "2022-03-06T00:00:00Z",
      "calculatedEmissionsGrams": "13.30873434169560400000000000000000",
      "edgeBytes": "746837257585"
    },
    {
      "startdatetime": "2022-03-07T00:00:00Z",
      "calculatedEmissionsGrams": "15.33859360123979500000000000000000",
      "edgeBytes": "840985616196"
    },
    {
      "startdatetime": "2022-03-08T00:00:00Z",
      "calculatedEmissionsGrams": "18.14157320804796900000000000000000",
      "edgeBytes": "1018041272975"
    },
    {
      "startdatetime": "2022-03-09T00:00:00Z",
      "calculatedEmissionsGrams": "18.47703419326714200000000000000000",
      "edgeBytes": "1033757061634"
    },
    {
      "startdatetime": "2022-03-10T00:00:00Z",
      "calculatedEmissionsGrams": "18.66120028239241600000000000000000",
      "edgeBytes": "1035613105690"
    },
    {
      "startdatetime": "2022-03-11T00:00:00Z",
      "calculatedEmissionsGrams": "18.14010203309837900000000000000000",
      "edgeBytes": "1017958030505"
    },
    {
      "startdatetime": "2022-03-12T00:00:00Z",
      "calculatedEmissionsGrams": "27.05105312021800400000000000000000",
      "edgeBytes": "1518013983406"
    },
    {
      "startdatetime": "2022-03-13T00:00:00Z",
      "calculatedEmissionsGrams": "26.27569980772181200000000000000000",
      "edgeBytes": "1474338409106"
    }
  ],
  "summaryStatistics": {
    "calculatedEmissionsGramsTotal": {
      "value": "216.2537775972232",
      "details": {}
    },
    "edgeBytesTotal": {
      "value": "12077220164812",
      "details": {}
    }
  }
}
  
    

CSV response

Status 200 text/csv

Response Body:

#METADATA_START
name,carbondata-by-time
version,1
source,carbondata-by-time/versions/1
groupBy,startdatetime
start,2022-03-01T00:00:00Z
end,2022-03-14T00:00:00Z
interval,DAY
availableDataEnds,2022-03-21T20:00:00Z
suggestedRetryTime,
rowCount,13
objectType,cpcode
objectIds,3310851,3310852,3310853
#METADATA_END

#SUMMARYSTATISTICS_START
calculatedEmissionsGramsTotal,216.2537775972232
edgeBytesTotal,12077220164812
#SUMMARYSTATISTICS_END

#COLUMNS_START
startdatetime,calculatedEmissionsGrams,edgeBytes
#COLUMNS_END

#DATA_START
2022-03-01T00:00:00Z,7.38776819156440300000000000000000,414566872650
2022-03-02T00:00:00Z,12.97413360931569500000000000000000,718528661250
2022-03-03T00:00:00Z,13.47185359078994900000000000000000,755990228623
2022-03-04T00:00:00Z,13.85226453686124000000000000000000,763334531816
2022-03-05T00:00:00Z,13.17376708101081400000000000000000,739255133376
2022-03-06T00:00:00Z,13.30873434169560400000000000000000,746837257585
2022-03-07T00:00:00Z,15.33859360123979500000000000000000,840985616196
2022-03-08T00:00:00Z,18.14157320804796900000000000000000,1018041272975
2022-03-09T00:00:00Z,18.47703419326714200000000000000000,1033757061634
2022-03-10T00:00:00Z,18.66120028239241600000000000000000,1035613105690
2022-03-11T00:00:00Z,18.14010203309837900000000000000000,1017958030505
2022-03-12T00:00:00Z,27.05105312021800400000000000000000,1518013983406
2022-03-13T00:00:00Z,26.27569980772181200000000000000000,1474338409106
#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/carbondata-by-time/versions/1

Status 200 application/json

Response body:

{
  "name": "carbondata-by-time",
  "businessObjectName": "cpcode",
  "version": 1,
  "status": "DEPRECATED",
  "deprecated": false,
  "internalOnly": false,
  "timeBased": true,
  "supportsPagination": false,
  "outputType": "FLAT",
  "requiredProducts": [
    "Basic Traffic Reports"
  ],
  "requiredRoles": [
    "Reports - View only"
  ],
  "available": true,
  "metrics": [
    {
      "name": "calculatedEmissionsGramsTotal",
      "label": "Total Calculated Emissions Grams",
      "unit": "BYTE",
      "summaryStatistic": true
    },
    {
      "name": "edgeBytesTotal",
      "label": "Total Edge Bytes",
      "unit": "BYTE",
      "summaryStatistic": true
    },
    {
      "name": "calculatedEmissionsGrams",
      "label": "Calculated emissions in grams",
      "unit": "BYTE",
      "summaryStatistic": false
    },
    {
      "name": "edgeBytes",
      "label": "Edge Bytes",
      "unit": "BYTE",
      "summaryStatistic": false
    }
  ],
  "groupOutlyingValues": {
    "enabled": false
  },
  "groupBy": [
    "startdatetime"
  ],
  "filters": [
    {
      "name": "country",
      "type": "enum",
      "values": [
        {
          "value": "PR"
        },
        {
          "value": "PS"
        },
        {
          "value": "PT"
        },
        {
          "value": "PW"
        },
        {
          "value": "PY"
        },
        {
          "value": "QA"
        },
        {
          "value": "AD"
        },
        {
          "value": "AE"
        },
        {
          "value": "AF"
        },
        {
          "value": "AG"
        },
        {
          "value": "AI"
        },
        {
          "value": "AL"
        },
        {
          "value": "AM"
        },
        {
          "value": "AO"
        },
        {
          "value": "AQ"
        },
        {
          "value": "AR"
        },
        {
          "value": "AS"
        },
        {
          "value": "AT"
        },
        {
          "value": "RE"
        },
        {
          "value": "AU"
        },
        {
          "value": "AW"
        },
        {
          "value": "AZ"
        },
        {
          "value": "RO"
        },
        {
          "value": "BA"
        },
        {
          "value": "BB"
        },
        {
          "value": "RS"
        },
        {
          "value": "BD"
        },
        {
          "value": "BE"
        },
        {
          "value": "RU"
        },
        {
          "value": "BF"
        },
        {
          "value": "BG"
        },
        {
          "value": "RW"
        },
        {
          "value": "BH"
        },
        {
          "value": "BI"
        },
        {
          "value": "BJ"
        },
        {
          "value": "BL"
        },
        {
          "value": "BM"
        },
        {
          "value": "BN"
        },
        {
          "value": "BO"
        },
        {
          "value": "SA"
        },
        {
          "value": "BQ"
        },
        {
          "value": "SB"
        },
        {
          "value": "BR"
        },
        {
          "value": "SC"
        },
        {
          "value": "BS"
        },
        {
          "value": "SD"
        },
        {
          "value": "BT"
        },
        {
          "value": "SE"
        },
        {
          "value": "BV"
        },
        {
          "value": "SG"
        },
        {
          "value": "BW"
        },
        {
          "value": "SH"
        },
        {
          "value": "SI"
        },
        {
          "value": "BY"
        },
        {
          "value": "SJ"
        },
        {
          "value": "BZ"
        },
        {
          "value": "SK"
        },
        {
          "value": "SL"
        },
        {
          "value": "SM"
        },
        {
          "value": "SN"
        },
        {
          "value": "SO"
        },
        {
          "value": "CA"
        },
        {
          "value": "SR"
        },
        {
          "value": "CC"
        },
        {
          "value": "SS"
        },
        {
          "value": "CD"
        },
        {
          "value": "ST"
        },
        {
          "value": "CF"
        },
        {
          "value": "SV"
        },
        {
          "value": "CG"
        },
        {
          "value": "CH"
        },
        {
          "value": "SX"
        },
        {
          "value": "CI"
        },
        {
          "value": "SY"
        },
        {
          "value": "SZ"
        },
        {
          "value": "CK"
        },
        {
          "value": "CL"
        },
        {
          "value": "CM"
        },
        {
          "value": "CN"
        },
        {
          "value": "CO"
        },
        {
          "value": "CR"
        },
        {
          "value": "TC"
        },
        {
          "value": "TD"
        },
        {
          "value": "CU"
        },
        {
          "value": "TF"
        },
        {
          "value": "CV"
        },
        {
          "value": "TG"
        },
        {
          "value": "CW"
        },
        {
          "value": "TH"
        },
        {
          "value": "CX"
        },
        {
          "value": "CY"
        },
        {
          "value": "TJ"
        },
        {
          "value": "CZ"
        },
        {
          "value": "TK"
        },
        {
          "value": "TL"
        },
        {
          "value": "TM"
        },
        {
          "value": "TN"
        },
        {
          "value": "TO"
        },
        {
          "value": "TR"
        },
        {
          "value": "TT"
        },
        {
          "value": "DE"
        },
        {
          "value": "TV"
        },
        {
          "value": "TW"
        },
        {
          "value": "DJ"
        },
        {
          "value": "TZ"
        },
        {
          "value": "DK"
        },
        {
          "value": "DM"
        },
        {
          "value": "DO"
        },
        {
          "value": "UA"
        },
        {
          "value": "UG"
        },
        {
          "value": "DZ"
        },
        {
          "value": "UM"
        },
        {
          "value": "EC"
        },
        {
          "value": "US"
        },
        {
          "value": "EE"
        },
        {
          "value": "EG"
        },
        {
          "value": "EH"
        },
        {
          "value": "UY"
        },
        {
          "value": "UZ"
        },
        {
          "value": "VA"
        },
        {
          "value": "ER"
        },
        {
          "value": "VC"
        },
        {
          "value": "ES"
        },
        {
          "value": "ET"
        },
        {
          "value": "VE"
        },
        {
          "value": "EU"
        },
        {
          "value": "VG"
        },
        {
          "value": "VI"
        },
        {
          "value": "VN"
        },
        {
          "value": "VU"
        },
        {
          "value": "FI"
        },
        {
          "value": "FJ"
        },
        {
          "value": "FK"
        },
        {
          "value": "FM"
        },
        {
          "value": "FO"
        },
        {
          "value": "FR"
        },
        {
          "value": "WF"
        },
        {
          "value": "GA"
        },
        {
          "value": "GB"
        },
        {
          "value": "WS"
        },
        {
          "value": "GD"
        },
        {
          "value": "GE"
        },
        {
          "value": "GF"
        },
        {
          "value": "GG"
        },
        {
          "value": "GH"
        },
        {
          "value": "GI"
        },
        {
          "value": "GL"
        },
        {
          "value": "GM"
        },
        {
          "value": "GN"
        },
        {
          "value": "GP"
        },
        {
          "value": "GQ"
        },
        {
          "value": "GR"
        },
        {
          "value": "GS"
        },
        {
          "value": "GT"
        },
        {
          "value": "GU"
        },
        {
          "value": "GW"
        },
        {
          "value": "GY"
        },
        {
          "value": "HK"
        },
        {
          "value": "HM"
        },
        {
          "value": "HN"
        },
        {
          "value": "HR"
        },
        {
          "value": "HT"
        },
        {
          "value": "YE"
        },
        {
          "value": "HU"
        },
        {
          "value": "ID"
        },
        {
          "value": "YT"
        },
        {
          "value": "IE"
        },
        {
          "value": "IL"
        },
        {
          "value": "IM"
        },
        {
          "value": "IN"
        },
        {
          "value": "IO"
        },
        {
          "value": "ZA"
        },
        {
          "value": "IQ"
        },
        {
          "value": "IR"
        },
        {
          "value": "IS"
        },
        {
          "value": "IT"
        },
        {
          "value": "ZM"
        },
        {
          "value": "JE"
        },
        {
          "value": "ZW"
        },
        {
          "value": "JM"
        },
        {
          "value": "JO"
        },
        {
          "value": "JP"
        },
        {
          "value": "KE"
        },
        {
          "value": "KG"
        },
        {
          "value": "KH"
        },
        {
          "value": "KI"
        },
        {
          "value": "KM"
        },
        {
          "value": "KN"
        },
        {
          "value": "KP"
        },
        {
          "value": "KR"
        },
        {
          "value": "KW"
        },
        {
          "value": "KY"
        },
        {
          "value": "KZ"
        },
        {
          "value": "LA"
        },
        {
          "value": "LB"
        },
        {
          "value": "LC"
        },
        {
          "value": "LI"
        },
        {
          "value": "LK"
        },
        {
          "value": "LR"
        },
        {
          "value": "LS"
        },
        {
          "value": "LT"
        },
        {
          "value": "LU"
        },
        {
          "value": "LV"
        },
        {
          "value": "LY"
        },
        {
          "value": "MA"
        },
        {
          "value": "MC"
        },
        {
          "value": "MD"
        },
        {
          "value": "ME"
        },
        {
          "value": "MF"
        },
        {
          "value": "MG"
        },
        {
          "value": "MH"
        },
        {
          "value": "MK"
        },
        {
          "value": "ML"
        },
        {
          "value": "MM"
        },
        {
          "value": "MN"
        },
        {
          "value": "MO"
        },
        {
          "value": "MP"
        },
        {
          "value": "MQ"
        },
        {
          "value": "MR"
        },
        {
          "value": "MS"
        },
        {
          "value": "MT"
        },
        {
          "value": "MU"
        },
        {
          "value": "MV"
        },
        {
          "value": "MW"
        },
        {
          "value": "MX"
        },
        {
          "value": "MY"
        },
        {
          "value": "MZ"
        },
        {
          "value": "NA"
        },
        {
          "value": "NC"
        },
        {
          "value": "NE"
        },
        {
          "value": "NF"
        },
        {
          "value": "NG"
        },
        {
          "value": "NI"
        },
        {
          "value": "NL"
        },
        {
          "value": "NO"
        },
        {
          "value": "NP"
        },
        {
          "value": "NR"
        },
        {
          "value": "NU"
        },
        {
          "value": "NZ"
        },
        {
          "value": "OM"
        },
        {
          "value": "PA"
        },
        {
          "value": "PE"
        },
        {
          "value": "PF"
        },
        {
          "value": "PG"
        },
        {
          "value": "PH"
        },
        {
          "value": "PK"
        },
        {
          "value": "PL"
        },
        {
          "value": "PM"
        },
        {
          "value": "PN"
        }
      ],
      "required": false
    },
    {
      "name": "delivery_type",
      "type": "enum",
      "values": [
        {
          "value": "secure"
        },
        {
          "value": "non_secure"
        }
      ],
      "required": false
    }
  ],
  "intervals": [
    "DAY"
  ],
  "dataRetentionDays": 92,
  "links": [
    {
      "rel": "self",
      "href": "/reporting-api/v1/reports/carbondata-by-time/versions/1"
    },
    {
      "rel": "versions",
      "href": "/reporting-api/v1/reports/carbondata-by-time/versions"
    },
    {
      "rel": "all-reports",
      "href": "/reporting-api/v1/reports"
    },
    {
      "rel": "execute-report",
      "href": "/reporting-api/v1/reports/carbondata-by-time/versions/1/report-data"
    }
  ]
}