/v1/deployments/{uid}/metrics/historyReturns 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
uidstringRequiredThe deployment's uid.
Query parameters
rangestringTime range to return.
Default 1hOne of15m1h6h24h7d30d
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The metric history.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
deployment_uidstringRequiredUID of the deployment.
availablebooleanRequiredfalse when there are no samples in the range.
stalebooleanRequiredtrue when the newest sample is more than two minutes old.
rangestringRequiredThe requested range.
step_secondsintegerRequiredSuggested chart resolution for the range: 15, 60, 300, 900, 3600 or 21600 seconds.
latestanyRequiredThe newest sample, or null when there are none.
pointsarray of objectsRequiredSamples in the range, oldest first. Up to 2,000.
Show item attributesHide item attributes
timestampstring (date-time)RequiredWhen the sample was taken.
replica_countintegerRequiredReplicas that existed.
ready_replica_countintegerRequiredReplicas that were ready.
cpu_coresnumberRequiredCPU in use, in cores.
memory_bytesintegerRequiredMemory in use, in bytes.
network_rx_bytes_per_secnumberRequiredInbound network rate in bytes per second.
network_tx_bytes_per_secnumberRequiredOutbound network rate in bytes per second.
storage_used_bytesintegerUsed space on persistent volumes. Omitted without volumes.
storage_capacity_bytesintegerCapacity of persistent volumes. Omitted without volumes.
unavailable_reasonstringWhy there is no data, for example no metrics received in range.
Errors
| Status | Meaning |
|---|---|
400 | range is not one of the allowed values. |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The resource does not exist or you cannot access it. |
Errors use the standard error format.