BillOS v1
Console llms.txt OpenAPI
GET/traffic

Your traffic as a series

GET /traffic

Requires the businesses scope.

Requests and errors under your key as a dense series: the last 24 hours by the hour, or the last 7 or 30 days by the day (Israel time), with the period's totals and server-side latency over the part of it the request log holds.

Query parameters

NameTypeDescription
periodstringOne of: 24h, 7d, 30d. Default 7d.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
periodstringrequiredOne of: 24h, 7d, 30d.
unitstringrequiredOne of: hour, day.
bucketsarray of objectrequired
totalsobjectrequired
totals.requestsinteger
totals.errorsinteger
latencyobject
latency.countinteger
latency.p50integerMedian, ms.
latency.p95integer95th percentile, ms.

Errors: 400, 401, 403, 404, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

GET /traffic
curl -X GET "$BASE/traffic?period=" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/traffic`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.get(
    f"{BASE}/traffic",
    headers={"X-Api-Key": KEY},
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.