Skip to content

Get deployment metric history

GET/v1/deployments/{uid}/metrics/history

Returns resource samples for the chosen time range, oldest first. At most the 2,000 most recent samples in the range are returned. step_seconds is the suggested chart resolution for the range; the points themselves are the raw samples.

When no samples exist in the range, available is false, points is empty and latest is null.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The deployment's uid.

Query parameters

rangestring

Time range to return.

Default 1hOne of15m1h6h24h7d30d

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The metric history.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
deployment_uidstringRequired

UID of the deployment.

availablebooleanRequired

false when there are no samples in the range.

stalebooleanRequired

true when the newest sample is more than two minutes old.

rangestringRequired

The requested range.

step_secondsintegerRequired

Suggested chart resolution for the range: 15, 60, 300, 900, 3600 or 21600 seconds.

latestanyRequired

The newest sample, or null when there are none.

pointsarray of objectsRequired

Samples in the range, oldest first. Up to 2,000.

Show item attributes
timestampstring (date-time)Required

When the sample was taken.

replica_countintegerRequired

Replicas that existed.

ready_replica_countintegerRequired

Replicas that were ready.

cpu_coresnumberRequired

CPU in use, in cores.

memory_bytesintegerRequired

Memory in use, in bytes.

network_rx_bytes_per_secnumberRequired

Inbound network rate in bytes per second.

network_tx_bytes_per_secnumberRequired

Outbound network rate in bytes per second.

storage_used_bytesinteger

Used space on persistent volumes. Omitted without volumes.

storage_capacity_bytesinteger

Capacity of persistent volumes. Omitted without volumes.

unavailable_reasonstring

Why there is no data, for example no metrics received in range.

Errors

StatusMeaning
400range is not one of the allowed values.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.

Errors use the standard error format.