Get metrics
GEThttps://api.instacloud.com/projects/{projectId}/metrics
Token scope: account · org · project — read-only tokens allowed.
Resource metrics (compute and managed databases via the compute plane's metrics API; insta-db serves CPU/memory/storage series, other database providers return a note instead)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
component | query | "db" | "compute" | "redis" | "mysql" | "mongodb" | yes | |
branch | query | string | no | branch name (default branch if omitted) |
group | query | string | no | one service by name; omit for EVERY service of this component on the branch, each series tagged with labels.group |
breakdown | query | "instance" | no | CPU and memory per replica, labelled with labels.instance. Requires component=compute and an explicit nonempty group. Omit for service totals; network and disk remain service totals only. |
from | query | integer | no | unix seconds (default now-3600) |
to | query | integer | no | unix seconds (default now) |
step | query | string | no | PromQL step |
projectId | path | string | yes |
Responses
200
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
source | string | no | |
series | object[] | no | |
series.name | string | no | |
series.unit | string | no | |
series.labels | object | no | |
series.sampleIntervalSeconds | number | no | Source sampling interval in seconds, independent of the requested chart step. |
series.points | number[][] | no | [unixSeconds, value] pairs |
note | string | no | present when a provider can't serve the request (e.g. DB metrics) |
400
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
409
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
502
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |