---
title: "CDN resource statistics"
method: GET
path: "/cdn/statistics/series"
tags: ["CDN Statistics"]
---

# CDN resource statistics

`GET /cdn/statistics/series`

Get CDN resources statistics for up to 365 days starting today.

## Query parameters

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

## Response `200`

Successful.

- GetSeriesResponse
  - `resource` object — Resources IDs by which statistics data is grouped.
  - `1 (example)` object — ID of CDN resource for which statistics data is shown.
  - `region` object — 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
  - `metrics` object — 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_bytes`** – `shield_bytes`, `upstream_bytes` and `sent_bytes` combined. - **`cdn_bytes`** – `sent_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. Metrics **`upstream_response_time`** and **`request_time`** should be requested separately from other metrics
  - `upstream_bytes` integer[] — Bytes from the upstream to the CDN servers. Represented by two values: - 1543622400 — Time in the UNIX timestamp when statistics were received. - 17329220573 — Bytes.
  - `sent_bytes` integer[] — Bytes from CDN servers to the end-users. Represented by two values: - 1543622400 — Time in the UNIX timestamp when statistics were received. - 17329220573 — Bytes.
  - `total_bytes` integer[] — Upstream bytes and `sent_bytes` combined. Represented by two values: - 1543622400 — Time in the UNIX timestamp when statistics were received. - 17329220573 — Bytes.
  - `backblaze_bytes` integer[] — BackBlaze bytes from Backblaze origin. Represented by two values: - 1543622400 — Time in the UNIX timestamp when statistics were received. - 17329220573 — Bytes.

## 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.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
