Skip to main content
GET
Get time-series metrics for SQL queries

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

branch
string
required

Branch name from list_branches. Example: main.

Query Parameters

metrics
enum<string>[]

Metric names to retrieve

Available options:
avg_parallel_workers,
avg_shard_queries,
block_cache_hit_ratio,
blocks_dirtied,
blocks_hit,
blocks_read,
blocks_written,
cpu_duration_millis,
egress_bytes,
egress_bytes_per_query,
index_usage_percent,
ingress_bytes,
ingress_bytes_per_query,
io_duration_millis,
latency_max,
latency_min,
latency_p50,
latency_p95,
latency_p99,
latency_p999,
max_egress_bytes,
max_ingress_bytes,
max_shard_queries,
plan_change_score,
queries,
query_errors,
routing_index_usage_percent,
rows_affected_per_query,
rows_read,
rows_read_per_query,
rows_read_per_returned,
rows_returned,
rows_returned_per_query,
rows_written,
total_duration_millis,
traffic_control_throttled,
traffic_control_warnings
query_ids
string[]

Query pattern IDs to retrieve metrics for

fingerprint
string

Filter by query fingerprint

keyspace
string

Keyspace for the query fingerprint

period
enum<string>

Named time period to retrieve. Defaults to 12h.

Available options:
15m,
1h,
3h,
6h,
12h,
1d,
2d,
7d,
8d
from
string

Start of a custom time range as an ISO 8601 timestamp

to
string

End of a custom time range as an ISO 8601 timestamp

steps
integer

Number of data points to return

tablet_type
enum<string>

Filter by tablet type

Available options:
primary,
replica,
rdonly
budget_id
string

Filter by traffic budget ID

rule_id
string

Filter by traffic rule ID

q
string

Filter by search terms

Response

Returns time-series metrics for SQL queries

type
string

The metrics response type

start_date
string

The start of the time range

end_date
string

The end of the time range

interval
integer

The step interval in seconds between data points

series
string[]

The time-series metric data