get_stats
This page answers what get_stats returns, what it takes, and what an unknown health means.
Purpose
get_stats reports how each held thing is doing now: its health by default, plus timestamped
metrics with metrics: true. It never returns secrets and changes nothing.
Inputs
| Input | Type | Meaning |
|---|---|---|
kinds | list of text | Keep only these record kinds. Omit it for every active kind. |
lookups | list of text | Keep only these record lookups. Omit it for every record. |
metrics | true or false | Also return timestamped metrics beside health. Default false. |
Example
{ "kinds": ["DataConnections"], "metrics": true }
The answer is { Kinds: { <Kind>: { <Lookup>: ... } } }.
The Licenses line
Beside Kinds, the answer carries Licenses: for each licence the workspace sells, its Stripe health Status
(Healthy, Degraded, Unhealthy or Unknown) and the codes of its problems, never a value. It needs the
Licenses.Read right. When it cannot be read, it is Known: false with a Reason and a Remedy, such as
LICENSES_HEALTH_UNREACHABLE; the other lines are unaffected. Asking only for other kinds leaves it out. For the
checks behind a status, and for stats, events and subscribers, see the
Licenses reads of call_api.
Errors
- A
Health.Statusof"unknown"carries aDetailthat says why. - A kind that reports nothing answers
Known: falsewith the reasonNO_STATS_SOURCE. - An unknown name in
kindsis refused with the list of active kinds.