Access

Access KPIs

Returns aggregate KPI metrics for access logs in the requested time range — the same window, source and filters /access/chart uses for the same request, so the cards and the bars agree. Accepts every filter[...] field /access/events does except event_id, plus search.

Latency is p50/p90/p95 from a t-digest. Deltas compare against the preceding window of equal length. Sparklines share one grid of at most 30 points whose step is a whole multiple of the chart's bucket. When a raw read trips its bound the response is capped: true: total_requests and every other measure are null.

get/access/kpis

Request

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

Query parameters

'5m'
OR
'15m'
OR
'1h'
OR
'6h'
OR
'24h'
OR
'7d'
OR
'14d'
OR
'30d'

Relative look-back window. Ignored when from/to are supplied.

fromstring date-time

Inclusive window start, ISO-8601. Use together with to for an explicit range instead of time_range.

tostring date-time

Exclusive window end, ISO-8601. Defaults to now when only from is given.

searchstring

Free-text substring match against the request URI. Matched with lower(uri) LIKE '%needle%', so separators (/, -, _, ., :) are fine. Control bytes are rejected; min 3 chars, max 128.

On an aggregate endpoint a search is answered from the raw table, whose read is bounded: past ACCESS_RAW_ROW_CAP rows scanned the response is capped: true. The floor is not cosmetic: access_logs_v1 has no index on uri, so a 1–2 char needle scans the owner's slice for a match that would hit nearly every row.

filter[status_code][in]integer[]

Include rows where status_code (HTTP response status code) is one of the given values. Repeat the parameter to pass multiple values.

filter[status_code][nin]integer[]

Exclude rows where status_code (HTTP response status code) is none of the given values. Repeat the parameter to pass multiple values.

filter[status_code][between]integer[]

Include rows where status_code (HTTP response status code) falls within an inclusive numeric range (SQL BETWEEN lo AND hi). Pass the parameter exactly twice: first the lower bound, then the upper bound.

filter[network][in]string[]

Include rows where network (blockchain network (chain-qualified)) is one of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no network (unattributed traffic).

filter[network][nin]string[]

Exclude rows where network (blockchain network (chain-qualified)) is none of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no network (unattributed traffic).

filter[chain][in]string[]

Include rows where chain (blockchain — the parent of network) is one of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no chain (unattributed traffic).

filter[chain][nin]string[]

Exclude rows where chain (blockchain — the parent of network) is none of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no chain (unattributed traffic).

filter[method][in]string[]

Include rows where method (HTTP / RPC method) is one of the given values. Repeat the parameter to pass multiple values.

filter[method][nin]string[]

Exclude rows where method (HTTP / RPC method) is none of the given values. Repeat the parameter to pass multiple values.

filter[method][contains]string

Include rows where method (HTTP / RPC method) contains this substring (SQL LIKE '%value%').

filter[remote_ip][in]string[]

Include rows where remote_ip (client IP address, IPv4 or IPv6 (IPv6 matched in canonical form)) is one of the given values. Repeat the parameter to pass multiple values.

filter[remote_ip][nin]string[]

Exclude rows where remote_ip (client IP address, IPv4 or IPv6 (IPv6 matched in canonical form)) is none of the given values. Repeat the parameter to pass multiple values.

filter[source][in]string[]

Include rows where source (traffic source / attribution channel) is one of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no source (unattributed traffic).

filter[source][nin]string[]

Exclude rows where source (traffic source / attribution channel) is none of the given values. Repeat the parameter to pass multiple values. Pass (empty) to match rows with no source (unattributed traffic).

filter[req_id][in]string[]

Include rows where req_id (request id — NOT unique, may match unrelated requests) is one of the given values. Repeat the parameter to pass multiple values.

Response

Aggregate access KPIs: volume, average RPS, latency percentiles, error rates, egress, deltas and sparklines.

total_requestsnumber nullable required

Requests in the window; null when capped (the raw read bound says nothing about matches).

avg_rpsnumber nullable required

Average requests per second: total_requests over the seconds of the window that have elapsed. null when capped.

rate_4xx_pctnumber nullable required

Share of requests that returned HTTP 4xx, as a percentage. null when capped.

rate_5xx_pctnumber nullable required

Share of requests that returned HTTP 5xx, as a percentage. null when capped.

total_egress_bytesnumber nullable required

Total bytes sent to clients across the window. null when capped.

cappedboolean required

True when the window was answered from the raw table and its read stopped at ACCESS_RAW_ROW_CAP rows scanned.

Example response

{
  "total_requests": 184230,
  "rate_4xx_pct": 1.35,
  "rate_5xx_pct": 0.12,
  "total_egress_bytes": 5928374650,
  "delta_pct": {
    "requests": 12.5,
    "latency_p50": -3.2,
    "egress": 5
  },
  "sparklines": {
    "requests": [
      {
        "timestamp": "2024-01-14T12:00:00.000Z",
        "value": 42
      }
    ],
    "egress": [
      {
        "timestamp": "2024-01-14T12:00:00.000Z",
        "value": 42
      }
    ],
    "latency_p50": [
      {
        "timestamp": "2024-01-14T12:00:00.000Z",
        "value": 42
      }
    ],
    "latency_p90": [
      {
        "timestamp": "2024-01-14T12:00:00.000Z",
        "value": 42
      }
    ],
    "latency_p95": [
      {
        "timestamp": "2024-01-14T12:00:00.000Z",
        "value": 42
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.