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

# Get Database Traffic

`GET /redis/traffic/{id}`

## Request

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

This endpoint reports where a database's traffic comes from over a period. Available for databases on a Pro plan or with the Production Pack.

## Path parameters

- `id` string, required

## Query parameters

- `period` string

## Response `200`

Database traffic retrieved successfully

- DatabaseTraffic
  - `period` string: The period every figure covers
  - `database_region` string: Primary region of the database, to compare client regions against
  - `client_network_window` string: Same as period
  - `client_networks` ClientNetwork[]
    - `prefix` string: Client network masked to /24 for IPv4 or /48 for IPv6
    - `entry_region` string: Region of the Upstash proxies the network's requests came in through. A network entering through several regions has one row per region.
    - `provider` string: aws, gcp, cloudflare, or internet when the address is not in a published range
    - `region` string: Provider region, empty for internet
    - `count` number: Sampled observations. The proxies keep an hour of samples; for longer periods the hourly figures are added up over time, so compare rows rather than read it as a request count
    - `weight` number: Estimated observations, an upper bound, added up over time like count
    - `share` number: Share of all sampled observations, 0 to 1
    - `idle_seconds` number: Seconds since the network was last seen; for periods over 1h, the lowest value over the period
  - `client_network_evictions` number: Networks the proxies pushed out of their sampling tables. A value comparable to the observations means the list is a sample of the traffic rather than a ranking.
  - `telemetry_window` string: Same as period
  - `telemetry` object
    - `sdks` TelemetryShare[]
      - `name` string
      - `count` number
      - `share` number
    - `platforms` TelemetryShare[]
      - `name` string
      - `count` number
      - `share` number
    - `runtimes` TelemetryShare[]
      - `name` string
      - `count` number
      - `share` number
    - `retries` object
      - `requests` number
      - `retried` number
      - `rate` number
  - `routes_window` string: Same as period
  - `routes` TrafficRoute[]
    - `proxy_region` string: Region the requests entered in
    - `member_region` string: Region of the replica that served them
    - `http_requests` number
    - `tcp_connections_opened` number
    - `tcp_connections` number: Connections open now; every other figure covers the requested period
    - `ingress_bytes` number: Bytes clients sent
    - `egress_bytes` number: Bytes clients received
    - `errors` number
    - `cross_region` boolean
  - `entry_regions` object[]
    - `region` string
    - `share` number
  - `cross_region_share` number: Share of bytes served by a replica in another region than the entry region
  - `commands` object: Command counts over the period, absent when the database saw none
    - `rest_commands` number: Commands received over REST
    - `script_commands` number: Commands that Lua scripts ran internally

## Changes

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

[Operation history](https://skmtc.dev/upstash/apis/developer-api-upstash/changes/redis/traffic/: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)
