Resolve a metric value
GET
/v1/metrics/{id}/value
Returns the computed value for a single metric, scoped to the period and as-of date. Capability scopes on the API key gate which metrics resolve.
Authorizations
BearerAuth
API key in the form one_pk_<random>. Mint at /settings/api-keys.
Type
HTTP (bearer)
Parameters
Path Parameters
id*
The metric id, e.g. revenue.total or cash.balance.
Type
Requiredstring
Example
"123"Query Parameters
period
Period to resolve. Keywords (today, mtd, ytd, last_fy, last_12_months, …) or an absolute range YYYY-MM-DD:YYYY-MM-DD. See the period syntax guide.
Type
string
asOf
Pin all relative periods to this historical date (YYYY-MM-DD or today). Defaults to today.
Type
string
Responses
The resolved metric value wrapped in the standard envelope. data.kind discriminates the shape (scalar, timeseries, etc.).
application/json
JSON "data": { "kind": "string", "value": 0, "currency": "string", "periodLabel": "string" }, "meta": { "metric": "string", "period": { "requested": { "type": "string", "startDate": "string", "endDate": "string" }, "resolved": { "startDate": "string", "endDate": "string", "asOfDate": "string", "kind": "string", "label": "string" } }, "asOf": "string", "baseCurrency": "string", "computedAt": "string", "version": 0 }
{
}