API ReferenceStats
Run a free-form stats query
Free-form stats query — discriminated union of getMetric, getMetricRange, getTotalMetric, getMetricAcrossDimension
x-api-key<token>
Project-scoped API key. Keys carry either the ADMIN or TENANT role; a route additionally requires that the key's role is listed in its x-required-roles. Machine-to-machine callers should use this.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/stats/query" \ -H "Content-Type: application/json" \ -d '{ "op": "getMetric", "window": "HOUR", "dimension": "GLOBAL", "dimensionValue": "string", "metric": "SMS_COUNT", "timestamp": "string" }'{ "op": "getMetric", "value": 0}