---
title: "Get time-series metrics"
method: GET
path: "/organizations/{organization}/databases/{database}/branches/{branch}/metrics"
tags: ["Metrics"]
---

# Get time-series metrics

`GET /organizations/{organization}/databases/{database}/branches/{branch}/metrics`

### Authorization
A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

**Service Token Accesses**
 `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`

**OAuth Scopes**

 | Resource | Scopes |
| :------- | :---------- |
| Organization | `read_branches` |
| Database | `read_branches` |
| Branch | `read_branch` |

## Path parameters

- `organization` string, required
- `database` string, required
- `branch` string, required

## Query parameters

- `metrics` string[]
- `period` '15m' | '1h' | '3h' | '6h' | '12h' | '1d' | '2d' | '7d' | '8d'
- `from` string
- `to` string
- `steps` integer
- `tablet_type` 'primary' | 'replica' | 'rdonly'
- `keyspace` string
- `shard` string
- `role` string
- `container` string
- `pod` string
- `pods` string[]
- `query_ids` string[]
- `fingerprint` string
- `budget_id` string
- `rule_id` string
- `q` string

## Response `200`

Returns time-series metrics

- object
  - `type` string, required — The metrics response type
  - `start_date` string, required — The start of the time range
  - `end_date` string, required — The end of the time range
  - `interval` integer, required — The step interval in seconds between data points
  - `series` string[], required

## Other responses

- `400` — Malformed metrics parameter
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Metrics service unavailable

## Changes

- **2026-08-28** `6d28c038c4fd` — 6 info
  - added the non-success response with the status `400`
  - the response property `end_date` became required for the status `200`
  - the response property `interval` became required for the status `200`
  - the response property `series` became required for the status `200`
  - …2 more
- **2026-08-18** `249942995489` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/planetscale/apis/planetscale-api/changes/organizations/:organization/databases/:database/branches/:branch/metrics/get.md)

---

[API](https://skmtc.dev/planetscale/apis/planetscale-api.md) · [All operations](https://skmtc.dev/planetscale/apis/planetscale-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/planetscale/planetscale-api/revisions/6d28c038c4fd/schema)
