Skip to content

Resolve many metrics in one request

POST
/v1/metrics/batch

Resolves up to 50 metrics in a single request. The batch never short-circuits — each query gets its own ok/error result keyed by the caller-supplied key. Useful for dashboards that need many metrics at once.

Authorizations

BearerAuth

API key in the form one_pk_<random>. Mint at /settings/api-keys.

Type
HTTP (bearer)

Request Body

application/json
JSON
{
  
"queries": [
  
  
{
  
  
  
"key": "string",
  
  
  
"id": "string",
  
  
  
"period": "string"
  
  
}
  
],
  
"asOf": "string"
}

Responses

Per-key results map and shared meta envelope.

application/json
JSON
{
  
"results": {
  
  
"additionalProperties": null
  
},
  
"meta": {
  
  
"asOf": "string",
  
  
"baseCurrency": "string",
  
  
"computedAt": "string",
  
  
"version": 0
  
}
}

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI

OneBusiness · Built for businesses that work.