---
title: "Aggregated statistics"
method: GET
path: "/cdn/statistics/aggregate/stats"
tags: ["CDN Statistics"]
---

# Aggregated statistics

`GET /cdn/statistics/aggregate/stats`

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.

## Query parameters

- `service` string, required
- `from` string, required
- `to` string, required
- `metrics` string, required
- `group_by` string
- `regions` string
- `countries` string
- `resource` integer
- `flat` boolean

## Response `200`

Successful.

- GetAggregatedCDNStatisticsResponse
  - `resource` object — Resources IDs by which statistics data is grouped.
  - `1 (example)` object — CDN resource ID for which statistics data is shown.
  - `region` object — Regions by which statistics data is grouped.
  - `cis (example)` object — Region by which statistics data is grouped.
  - `metrics` object — Statistics parameters.
  - `upstream_bytes` integer — Traffic in bytes from the upstream to CDN servers.
  - `sent_bytes` integer — Traffic in bytes from CDN servers to clients.
  - `total_bytes` integer — Upstream bytes and `sent_bytes` combined.
  - `backblaze_bytes` integer — Traffic in bytes from Backblaze origin.
  - `requests` integer — Number of requests to edge servers.
  - `responses_2xx` integer — Number of 2xx response codes.
  - `responses_3xx` integer — Number of 3xx response codes.
  - `responses_4xx` integer — Number of 4xx response codes.
  - `responses_5xx` integer — Number of 5xx response codes.
  - `responses_hit` integer — Number of responses with the header Cache: HIT.
  - `responses_miss` integer — Number of responses with the header Cache: MISS.
  - `response_types` object — Statistics by content type. It returns a number of responses for content with different MIME types.
  - `cache_hit_traffic_ratio` integer — Formula: 1 - `upstream_bytes` / `sent_bytes`. We deduct the non-cached traffic from the total traffic amount
  - `95_percentile` integer — 95 percentile bandwidth value
  - `min_bandwidth` integer — Minimum bandwidth
  - `max_bandwidth` integer — Maximum bandwidth

## Other responses

- `204` — There is no data for the requested time period.
- `400` — Bad Request. Required parameter is missing.
- `401` — Unauthorized. Provided credentials are invalid or your API token has expired.
- `403` — Forbidden. Access denied. You do not have enough rights.
- `500` — Server errors. Something is wrong on our side.

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
