---
title: "Error KPIs"
method: GET
path: "/errors/kpis"
tags: ["Errors"]
---

# Error KPIs

`GET /errors/kpis`

## Request

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

Returns aggregate KPI metrics for errors in the requested time range.

## Query parameters

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

## Response `200`

Aggregate error KPIs with trend deltas and sparklines.

- ErrorKpisResponse: Aggregate error KPIs for the requested window, with trend deltas.
  - `total_events` number, required: All error events in the window, across every protocol (HTTP, JSON-RPC, gRPC, WebSocket). Reconciles with the heatmap and issues totals. The 5xx / 4xx counts below are HTTP-only subsets, so `total_events` is >= their sum.
  - `total_5xx` number, nullable, required: Server-error (5xx, HTTP-only) events; null when the result is capped.
  - `total_4xx` number, nullable, required: Client-error (4xx, HTTP-only) events; null when the result is capped.
  - `delta_total_pct` number, nullable, required: Percentage change in total errors vs. the preceding equal-length window. `null` when there is no prior data to compare against.
  - `delta_5xx_pct` number, nullable, required: Percentage change in 5xx vs. the preceding equal-length window. `null` when there is no prior data to compare against.
  - `delta_4xx_pct` number, nullable, required: Percentage change in 4xx vs. the preceding equal-length window. `null` when there is no prior data to compare against.
  - `sparkline_total` Sparkline, required: Compact time series used for trend visualizations (KPI cards, issue trends, per-source breakdowns). Points are ordered oldest → newest and cover the full requested window with empty buckets padded to `0`.
    - `points` SparklinePoint[], required: Ordered buckets, oldest first.
      - `timestamp` string, required: Start of the bucket, ISO-8601 UTC with a trailing `Z`.
      - `value` number, required: Aggregated count for the bucket (0 when the bucket is empty).
    - `total` number, required: Sum of `value` across all points — the window total in one number.
  - `sparkline_5xx` Sparkline, required: Compact time series used for trend visualizations (KPI cards, issue trends, per-source breakdowns). Points are ordered oldest → newest and cover the full requested window with empty buckets padded to `0`.
    - `points` SparklinePoint[], required: Ordered buckets, oldest first.
      - `timestamp` string, required: Start of the bucket, ISO-8601 UTC with a trailing `Z`.
      - `value` number, required: Aggregated count for the bucket (0 when the bucket is empty).
    - `total` number, required: Sum of `value` across all points — the window total in one number.
  - `sparkline_4xx` Sparkline, required: Compact time series used for trend visualizations (KPI cards, issue trends, per-source breakdowns). Points are ordered oldest → newest and cover the full requested window with empty buckets padded to `0`.
    - `points` SparklinePoint[], required: Ordered buckets, oldest first.
      - `timestamp` string, required: Start of the bucket, ISO-8601 UTC with a trailing `Z`.
      - `value` number, required: Aggregated count for the bucket (0 when the bucket is empty).
    - `total` number, required: Sum of `value` across all points — the window total in one number.
  - `top_operations` TopOperation[], required: Operations with the most errors, ranked descending.
    - `operation` string, required: RPC method / operation name.
    - `count` number, required: Error count for the operation in the window.
  - `capped` boolean, required: True when the result was served from the raw table and hit the row cap (10,000). When true, `total_events` is the cap, and `total_5xx`, `total_4xx`, the sparklines, and the deltas are `null`.

## 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)
