Documentation menu

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

NameInTypeRequiredDescription
componentquery"db" | "compute" | "redis" | "mysql" | "mongodb"yes
branchquerystringnobranch name (default branch if omitted)
groupquerystringnoone service by name; omit for EVERY service of this component on the branch, each series tagged with labels.group
breakdownquery"instance"noCPU 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.
fromqueryintegernounix seconds (default now-3600)
toqueryintegernounix seconds (default now)
stepquerystringnoPromQL step
projectIdpathstringyes

Responses

200

Default Response

FieldTypeRequiredDescription
sourcestringno
seriesobject[]no
series.namestringno
series.unitstringno
series.labelsobjectno
series.sampleIntervalSecondsnumbernoSource sampling interval in seconds, independent of the requested chart step.
series.pointsnumber[][]no[unixSeconds, value] pairs
notestringnopresent when a provider can't serve the request (e.g. DB metrics)

400

Default Response

FieldTypeRequiredDescription
errorstringyes

403

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

Default Response

FieldTypeRequiredDescription
errorstringyes

502

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown