Tawa docs
Analytics

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.

GET
/analytics/timeseries

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.

Authorization

AuthorizationBearer <token>

Your API key as a bearer token.

In: header

Query Parameters

start?string

Inclusive range start (ISO 8601 date-time). Must be given together with end, or omitted along with it to use the current billing period.

end?string

Exclusive range end (ISO 8601 date-time). See start.

interval?string

Bucket size. Defaults to day (always within the 1000-bucket cap).

include_preview?boolean

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
}