Skip to main content
POST
Retrieve branch metrics

Authorizations

Authorization
string
header
required

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

FlowImplicit
Authorization URL
https://auth.xata.io/realms/xata/protocol/openid-connect/auth
Scopes1
metrics:read
Read metrics data

Path Parameters

organizationID
string
required
Pattern: [a-zA-Z0-9_-~:]+
projectID
string
required
branchID
string
required

Body

application/json
start
string<date-time>
required

Start time

end
string<date-time>
required

End time

metrics
enum<string>[]
required

List of metric names to query.

Required array length: 1 - 15 elements

Name of a branch metric exposed by the API.

Available options:
cpu,
memory,
disk,
connections_active,
connections_idle,
network_ingress,
network_egress,
iops_read,
iops_write,
latency_read,
latency_write,
throughput_read,
throughput_write,
wal_sync_time,
replication_lag_time
aggregations
enum<string>[]
required

List of aggregations to get, this is how the data-points within the interval are aggregated. Each one will generate a separate time-series per metric in the response.

Available options:
avg,
max,
min
instances
string[]

List of instance IDs to query

Response

Metrics for a branch

A collection of metrics (cpu, memory, disk,...) for each of the instances of a branch

start
string<date-time>
required
end
string<date-time>
required
results
object[]
required

One entry per requested metric, in the order the metrics were requested.