v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
CDN Statistics

Aggregated statistics

Get aggregated CDN resources statistics.

Request URL parameters should be added as a query string after the endpoint.

Aggregated data does not include data for the last two hours.

get/cdn/statistics/aggregate/stats

Query parameters

servicestring required

Service name.

Possible value:

  • CDN
fromstring required

Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)

tostring required

End of the requested time period (ISO 8601/RFC 3339 format, UTC.)

metricsstring required

Types of statistics data.

Possible values:

  • upstream_bytes – Traffic in bytes from an origin server to CDN servers or to origin shielding when used.
  • sent_bytes – Traffic in bytes from CDN servers to clients.
  • shield_bytes – Traffic in bytes from origin shielding to CDN servers.
  • backblaze_bytes - Traffic in bytes from Backblaze origin.
  • total_bytesshield_bytes, upstream_bytes and sent_bytes combined.
  • cdn_bytessent_bytes and shield_bytes combined.
  • requests – Number of requests to edge servers.
  • responses_2xx – Number of 2xx response codes.
  • responses_3xx – Number of 3xx response codes.
  • responses_4xx – Number of 4xx response codes.
  • responses_5xx – Number of 5xx response codes.
  • responses_hit – Number of responses with the header Cache: HIT.
  • responses_miss – Number of responses with the header Cache: MISS.
  • response_types – Statistics by content type. It returns a number of responses for content with different MIME types.
  • cache_hit_traffic_ratio – Formula: 1 - upstream_bytes / sent_bytes. We deduct the non-cached traffic from the total traffic amount.
  • cache_hit_requests_ratio – Formula: responses_hit / requests. The share of sending cached content.
  • shield_traffic_ratio – Formula: (shield_bytes - upstream_bytes) / shield_bytes. The efficiency of the Origin Shielding: how much more traffic is sent from the Origin Shielding than from the origin.
  • image_processed - Number of images transformed on the Image optimization service.
  • request_time - Time elapsed between the first bytes of a request were processed and logging after the last bytes were sent to a user.
  • upstream_response_time - Number of milliseconds it took to receive a response from an origin. If upstream response_time_ contains several indications for one request (in case of more than 1 origin), we summarize them. In case of aggregating several queries, the average of this amount is calculated.
  • 95_percentile - Represents the 95th percentile of network bandwidth usage in bytes per second. This means that 95% of the time, the network resource usage was below this value.
  • max_bandwidth - The maximum network bandwidth that was used during the selected time represented in bytes per second.
  • min_bandwidth - The minimum network bandwidth that was used during the selected time represented in bytes per second.

Metrics upstream_response_time and request_time should be requested separately from other metrics

group_bystring

Output data grouping.

Possible values:

  • resource – Data is grouped by CDN resources IDs.
  • region – Data is grouped by regions of CDN edge servers.
  • country – Data is grouped by countries of CDN edge servers.
  • vhost – Data is grouped by resources CNAMEs.
  • client_country - Data is grouped by countries, based on end-users' location.

To request multiple values, use:

  • &group_by=region&group_by=resource
regionsstring

Regions for which data is displayed.

Possible values:

  • na – North America
  • eu – Europe
  • cis – Commonwealth of Independent States
  • asia – Asia
  • au – Australia
  • latam – Latin America
  • me – Middle East
  • africa - Africa
  • sa - South America
countriesstring

Names of countries for which data should be displayed. English short name from ISO 3166 standard without the definite article ("the") should be used.

To request multiple values, use:

  • &countries=france&countries=denmark
resourceinteger

CDN resources IDs by that statistics data is grouped.

To request multiple values, use:

  • &resource=1&resource=2

If CDN resource ID is not specified, data related to all CDN resources is returned.

flatboolean

The way the parameters are arranged in the response.

Possible values:

  • true – Flat structure is used.
  • false – Embedded structure is used (default.)

Response

Successful.

resourceobject

Resources IDs by which statistics data is grouped.

1 (example)object

CDN resource ID for which statistics data is shown.

regionobject

Regions by which statistics data is grouped.

cis (example)object

Region by which statistics data is grouped.

metricsobject

Statistics parameters.

upstream_bytesinteger

Traffic in bytes from the upstream to CDN servers.

sent_bytesinteger

Traffic in bytes from CDN servers to clients.

total_bytesinteger

Upstream bytes and sent_bytes combined.

backblaze_bytesinteger

Traffic in bytes from Backblaze origin.

requestsinteger

Number of requests to edge servers.

responses_2xxinteger

Number of 2xx response codes.

responses_3xxinteger

Number of 3xx response codes.

responses_4xxinteger

Number of 4xx response codes.

responses_5xxinteger

Number of 5xx response codes.

responses_hitinteger

Number of responses with the header Cache: HIT.

responses_missinteger

Number of responses with the header Cache: MISS.

response_typesobject

Statistics by content type. It returns a number of responses for content with different MIME types.

cache_hit_traffic_ratiointeger

Formula: 1 - upstream_bytes / sent_bytes. We deduct the non-cached traffic from the total traffic amount

95_percentileinteger

95 percentile bandwidth value

min_bandwidthinteger

Minimum bandwidth

max_bandwidthinteger

Maximum bandwidth

Example response

{
  "resource": {
    "1": {
      "region": {
        "cis": {
          "metrics": {
            "95_percentile": 20023536,
            "cache_hit_traffic_ratio": 0.9958449964158854,
            "max_bandwidth": 34794756,
            "min_bandwidth": 379257,
            "requests": 21575631,
            "responses_2xx": 21095299,
            "responses_3xx": 278225,
            "responses_4xx": 202026,
            "responses_5xx": 81,
            "sent_bytes": 22014089592053,
            "total_bytes": 22105558213209,
            "backblaze_bytes": 2105658213209,
            "upstream_bytes": 91468621156,
            "responses_hit": 63368252,
            "responses_miss": 866237,
            "response_types": {
              "-": 378412,
              "application/json": 173054,
              "application/vnd": 7224,
              "application/zip": 8420,
              "image/gif": 1349,
              "image/jpeg": 2775,
              "image/png": 7536543,
              "image/webp": 746884
            }
          }
        },
        "eu": {
          "metrics": {
            "95_percentile": 14324356,
            "cache_hit_traffic_ratio": 0.9852247660029627,
            "max_bandwidth": 22215199,
            "min_bandwidth": 299608,
            "requests": 64234595,
            "responses_2xx": 62616980,
            "responses_3xx": 1196666,
            "responses_4xx": 420718,
            "responses_5xx": 216,
            "sent_bytes": 16552226067556,
            "backblaze_bytes": 2105658213209,
            "total_bytes": 16796789080876,
            "upstream_bytes": 244563013320,
            "responses_hit": 21235829,
            "responses_miss": 339566,
            "response_types": {
              "-": 478532,
              "application/json": 172084,
              "application/vnd": 3324,
              "application/zip": 8100,
              "image/gif": 1379,
              "image/jpeg": 1975,
              "image/png": 7131343,
              "image/webp": 643574
            }
          }
        }
      }
    }
  }
}