---
title: "Get statistics as time series"
method: GET
path: "/waap/v1/statistics/series"
tags: ["WAAP Service"]
---

# Get statistics as time series

`GET /waap/v1/statistics/series`

Retrieve statistics data as a time series. The `from` and `to` parameters are rounded down and up according to the `granularity`. This means that if the `granularity` is set to `1h`, the `from` and `to` parameters will be rounded down and up to the nearest hour, respectively. If the `granularity` is set to `1d`, the `from` and `to` parameters will be rounded down and up to the nearest day, respectively. The response will include explicit 0 values for any missing data points.

## Query parameters

- `from` string, date-time, required — Beginning of the requested time period (ISO 8601 format, UTC)
- `to` string, date-time, required — End of the requested time period (ISO 8601 format, UTC)
- `granularity` '1h' | '1d', required — Duration of the time blocks into which the data will be divided.
- `metrics` string[], required — List of metric types to retrieve statistics for.

## Response `200`

Successful Response

- StatisticsSeries — Response model for the statistics series
  - `total_bytes` StatisticItem[], nullable — Will be returned if `total_bytes` is requested in the metrics parameter
    - `date_time` string, date-time, required — The date and time for the statistic in ISO 8601 format
    - `value` integer, required — The value for the statistic. If there is no data for the given time, the value will be 0.
  - `total_requests` StatisticItem[], nullable — Will be included if `total_requests` is requested in the metrics parameter
    - `date_time` string, date-time, required — The date and time for the statistic in ISO 8601 format
    - `value` integer, required — The value for the statistic. If there is no data for the given time, the value will be 0.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Unauthenticated
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[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)
