Metrics

Get time-series 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

ResourceScopes
Organizationread_branches
Databaseread_branches
Branchread_branch
get/organizations/{organization}/databases/{database}/branches/{branch}/metrics

Path parameters

organizationstring required

Organization name slug from list_organizations. Example: acme.

databasestring required

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

branchstring required

Branch name from list_branches. Example: main.

Query parameters

metricsstring[]

Metric names to retrieve. Pass as metrics[]=name (repeat for multiple), metrics=name, or a comma-separated list (metrics=name,other). Time range is period (for example 15m) or ISO 8601 from/to.

period'15m' | '1h' | '3h' | '6h' | '12h' | '1d' | '2d' | '7d' | '8d'

Named time period to retrieve. Defaults to 12h.

fromstring

Start of a custom time range as an ISO 8601 timestamp

tostring

End of a custom time range as an ISO 8601 timestamp

stepsinteger

Number of data points to return

tablet_type'primary' | 'replica' | 'rdonly'

Filter by tablet type

keyspacestring

Filter by keyspace

shardstring

Filter by shard

rolestring

Filter by Postgres role

containerstring

Filter by container

podstring

Filter by pod

podsstring[]

Filter by pods

query_idsstring[]

Filter by query pattern IDs

fingerprintstring

Filter by query fingerprint

budget_idstring

Filter by traffic budget ID

rule_idstring

Filter by traffic rule ID

qstring

Filter by search terms

Response

Returns time-series metrics

typestring required

The metrics response type

start_datestring required

The start of the time range

end_datestring required

The end of the time range

intervalinteger required

The step interval in seconds between data points

seriesstring[] required

Changes