---
title: "Access chart"
method: GET
path: "/access/chart"
tags: ["Access"]
---

# Access chart

`GET /access/chart`

## Request

- Base URL: `https://api.tatum.io/v4/logs`
- URL: `https://api.tatum.io/v4/logs/access/chart`
- Auth: API key in header `x-api-key`

Returns bucketed request counts for chart rendering: per-status-class bands,
a true total, and a per-status-code breakdown for the tooltip.

Bucket width scales with the requested window, down to 1 ms, and is
reported once as `bucket_ms`; buckets are gap-filled, so an interval with no
traffic is still emitted with zeroes. Accepts every `filter[...]` field
`/access/events` does except `event_id`, plus `search`.

A window resolving to a sub-minute bucket, a `filter[req_id]` or a `search`
is answered from the raw table, whose read is bounded; when the bound trips
the response is `capped: true` with no buckets.

## Query parameters

- `time_range` union
  - '5m'
  - '15m'
  - '1h'
  - '6h'
  - '24h'
  - '7d'
  - '14d'
  - '30d'
- `from` string, date-time
- `to` string, date-time
- `search` string
- `filter[status_code][in]` integer[]
- `filter[status_code][nin]` integer[]
- `filter[status_code][between]` integer[]
- `filter[network][in]` string[]
- `filter[network][nin]` string[]
- `filter[chain][in]` string[]
- `filter[chain][nin]` string[]
- `filter[method][in]` string[]
- `filter[method][nin]` string[]
- `filter[method][contains]` string
- `filter[remote_ip][in]` string[]
- `filter[remote_ip][nin]` string[]
- `filter[source][in]` string[]
- `filter[source][nin]` string[]
- `filter[req_id][in]` string[]

## Response `200`

Bucketed request counts split by HTTP status class and status code.

- AccessChartResponse: Time series backing the access-traffic chart.
  - `buckets` ChartBucket[], required: Fixed-width buckets, oldest first, gap-filled across the whole window: an interval with no traffic is still emitted with zeroes.
    - `timestamp` string, required: Start of the bucket, ISO-8601 UTC. Aligned to the same grid ClickHouse's `toStartOfInterval` floors to, so consecutive buckets are exactly `bucket_ms` apart with no gaps.
    - `status_2xx` number, required: Successful responses (HTTP 2xx) in the bucket.
    - `status_3xx` number, required: Redirects (HTTP 3xx) in the bucket.
    - `status_4xx` number, required: Client-error responses (HTTP 4xx) in the bucket.
    - `status_5xx` number, required: Server-error responses (HTTP 5xx) in the bucket.
    - `total` number, required: Every request in the bucket, including 1xx and 3xx. `total - (status_2xx + status_3xx + status_4xx + status_5xx)` is the out-of-class remainder — 1xx, and `status_code: 0` where Envoy aborted before a response.
    - `by_status` ChartStatusCount[], required: Up to 8 status codes, highest count first, ties broken by ascending code. Empty for an empty bucket.
      - `status_code` number, required: HTTP response status code. `0` means Envoy aborted before a response.
      - `requests` number, required: Requests that returned this status code in the bucket.
    - `other_requests` number, required: Requests in status codes beyond the `by_status` cap. `0` when nothing was dropped, so `sum(by_status[].requests) + other_requests === total` always holds. Not the out-of-class remainder: 1xx and `status_code: 0` are inside `by_status` and inside `total`, they just have no band of their own.
    - `bytes_sent` number, required: Response bytes sent in the bucket.
    - `latency_p50_ms` number, nullable, required: Median request latency in the bucket, in milliseconds, from a t-digest. `null` for an empty bucket.
    - `latency_p90_ms` number, nullable, required: 90th-percentile request latency in the bucket. `null` for an empty bucket.
    - `latency_p95_ms` number, nullable, required: 95th-percentile request latency in the bucket. `null` for an empty bucket.
  - `bucket_ms` number, required: Resolved bucket width in milliseconds — the authority on the grid this response is bucketed to, so a client never re-derives one of its own and the two cannot disagree. Read it for axis tick spacing, for label precision, and to tell a complete bucket from the one still accumulating at the live edge. It does **not** give bar width: a renderer that draws bars from a pixel-per-bucket measurement takes its geometry from the series' own spacing instead.
  - `capped` boolean, required: True when the answer came from the raw table and its read stopped at `ACCESS_RAW_ROW_CAP` rows scanned. `buckets` is then empty, and `bucket_ms` still names the grid the window resolved to.

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/tatum/apis/logs-api.md) - [All operations](https://skmtc.dev/tatum/apis/logs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/logs-api/revisions/e47603e0f75f?raw)
