---
title: "Get Database Insights"
method: GET
path: "/redis/insights/{id}"
tags: ["redis"]
---

# Get Database Insights

`GET /redis/insights/{id}`

## Request

- Base URL: `https://api.upstash.com/v2`
- URL: `https://api.upstash.com/v2/redis/insights/{id}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/upstash/apis/developer-api-upstash/docs/redis/insights/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint returns the Insights series of a database: service latency percentiles, read, write, engine, replication, lock-wait and Lua latency, expired entries, replication lag, throughput, bandwidth and disk size, for the whole database, one replica or every region, with each series' latest window compared to the one before it, and how much the limit, security and Lua counters grew over the period. Latencies are in milliseconds. Available for databases on a Pro plan or with the Production Pack.

## Path parameters

- `id` string, required

## Query parameters

- `period` string
- `replica` string
- `by` 'region'

## Response `200`

Database insights retrieved successfully

- DatabaseInsights
  - `groups` InsightGroup[]: Every group the database has, regardless of the scope requested
    - `key` string: Key of the group in metrics and comparison for the all and region groups; pass a replica group's key as the replica parameter
    - `label` string
    - `kind` 'all' | 'region' | 'replica'
  - `metrics` object: Metric name to group key to data points. The all group is always present; region groups are added with by=region. Metrics: latency_p50, latency_p90, latency_p99, read_latency_99, write_latency_99, command_latency_99, replication_latency_999, wait_latency_99, lua_latency_p50, lua_latency_99, expired_entries (per minute), replication_lag (entries), throughput, bandwidth (bytes per second) and diskusage.
  - `comparison_window` string: Length of the latest window the comparison averages: the whole period up to three hours, the last three hours for longer periods.
  - `comparison` object: Metric name to group key to the mean over the latest window and over the equal window right before it. previous is absent when that earlier window has no data.
  - `counters` object: Growth of each counter over the period, for the whole database: over_size_requests (TCP and REST), over_size_record_accesses, throttled_commands (writes delayed by persistence backpressure), undeliverable (requests and connections the proxies could not hand to any replica), auth_failures (TCP and REST, including commands sent before authenticating and REST requests over the rate limit), keyspace_notifications, connections_opened, bandwidth_ingress, bandwidth_egress (bytes), rest_commands, lua_executions, lua_commands (commands run inside scripts), lua_failures, lua_timeouts and lua_memory_limits.
  - `anomalies` object: Metric name to up to three anomalies of its all series, largest first: stretches where the value stayed above both the period's median plus three standard deviations, estimated as 1.4826 times the median absolute deviation, and 30% over the median. A series with fewer than 8 points after its first positive value reports none. The median is raised to a small per-metric floor, so a nearly idle series does not report huge changes. An empty stretch at the start of the series is ignored, and a stretch longer than a third of the analyzed points is a level change, not an anomaly. Every metric is present; diskusage is never checked and always has an empty list.

## Changes

- **2026-10-16** `b1dc731a4680`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/upstash/apis/developer-api-upstash/changes/redis/insights/:id/get.md)

---

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