Bucketed metrics for charting
Call volume, decisions, credits, and latency bucketed by hour or day, zero-filled so every interval has a point — for a Grafana JSON-API panel or a Datadog custom HTTP check. Bounded to 90 days and 1000 buckets per request.
Call volume, decisions, credits, and latency bucketed by hour or day, zero-filled so every interval has a point — for a Grafana JSON-API panel or a Datadog custom HTTP check. Bounded to 90 days and 1000 buckets per request.
Your API key as a bearer token.
In: header
Query Parameters
Inclusive range start (ISO 8601 date-time). Must be given together with end, or omitted along with it to use the current billing period.
Exclusive range end (ISO 8601 date-time). See start.
Bucket size. Defaults to day (always within the 1000-bucket cap).
Include scans run from the dashboard (free preview scans). Defaults to false, so figures reflect production traffic only.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/analytics/timeseries"{
"appId": "string",
"interval": "hour",
"period": {
"start": "2019-08-24T14:15:22Z",
"end": "2019-08-24T14:15:22Z"
},
"buckets": [
{
"bucketStart": "2019-08-24T14:15:22Z",
"total": 0,
"completed": 0,
"failed": 0,
"blocked": 0,
"creditsUsed": 0,
"avgLatencyMs": 0
}
]
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}Aggregate metrics for a period GET
Call volume, decisions, latency, credits, and an organization-wide billing snapshot for the calling app. Defaults to the org's current billing period when `start`/`end` are omitted. Requires an analytics API key — a regular scan key is rejected.
Analytics API
Pull aggregate spend, call volume, and decision metrics into Grafana, Datadog, or another BI tool.