Redis

Get Database Stats

This endpoint gets detailed stats of a database.

GET/v2/redis/stats/{id}
cURL
curl --request GET \
  --url https://api.upstash.com/v2/redis/stats/{id} \
  --header 'Authorization: Bearer <token>'
200Response
{
  "monitor_count": {
    "x": "2023-05-22 10:59:23.426 +0000 UTC",
    "y": 320
  },
  "daily_net_commands": 7,
  "daily_read_requests": 7,
  "daily_write_requests": 0,
  "connection_count": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "keyspace": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "throughput": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "diskusage": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "latencymean": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "latency_99": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "read_latency_mean": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "read_latency_99": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "write_latency_mean": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "write_latency_99": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "hits": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "misses": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "read": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "write": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    }
  ],
  "dailyrequests": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    },
    {
      "x": "2025-09-04 15:12:52.76649148 +0000 UTC",
      "y": 7
    }
  ],
  "days": [
    "Sunday",
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday"
  ],
  "dailybilling": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    },
    {
      "x": "2025-09-04 15:12:52.76649148 +0000 UTC",
      "y": 1.333
    }
  ],
  "dailybandwidth": 50444740913,
  "bandwidths": [
    {
      "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
      "y": 0
    },
    {
      "x": "2025-09-04 15:12:52.76649148 +0000 UTC",
      "y": 7
    }
  ],
  "total_monthly_bandwidth": 7,
  "total_monthly_requests": 7,
  "total_monthly_read_requests": 7,
  "total_monthly_write_requests": 0,
  "total_monthly_script_requests": 0,
  "queue_optimized": false,
  "total_monthly_storage": 0,
  "current_storage": 0,
  "total_monthly_billing": 222.33902763855485,
  "command_counts": [
    {
      "metric_identifier": "EXISTS",
      "data_points": [
        {
          "x": "2025-08-31 15:12:52.799480932 +0000 UTC",
          "y": 0
        }
      ]
    }
  ]
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters

idpathstringrequired

The ID of the database

Response

200 — Database stats retrieved successfully

monitor_countobject
daily_net_commandsinteger

Total number of commands executed today

daily_read_requestsinteger

Total number of read requests executed today

daily_write_requestsinteger

Total number of write requests executed today

connection_countobject[]

Connection count over time

keyspaceobject[]

Total number of keys in the database over time

throughputobject[]

Throughput on database connections over time

diskusageobject[]

Disk usage over time

latencymeanobject[]

Average latency over time

latency_99object[]

99th percentile latency over time

read_latency_meanobject[]

Average read latency over time

read_latency_99object[]

99th percentile read latency over time

write_latency_meanobject[]

Average write latency over time

write_latency_99object[]

99th percentile write latency over time

hitsobject[]

Cache hits over time

missesobject[]

Cache misses over time

readobject[]

Read requests over time

writeobject[]

Write requests over time

dailyrequestsobject[]

Daily requests over time

daysstring[]

Days of the week for measurement

dailybillingobject[]

Daily billing amounts over time

dailybandwidthinteger

Total daily bandwidth usage in bytes

bandwidthsobject[]

Bandwidth usage over time

total_monthly_bandwidthinteger

Total bandwidth used in current month (bytes)

total_monthly_requestsinteger

Total requests in current month

total_monthly_read_requestsinteger

Total read requests in current month

total_monthly_write_requestsinteger

Total write requests in current month

total_monthly_script_requestsinteger

Total script requests in current month

queue_optimizedboolean

Whether queue optimization is enabled for the database

total_monthly_storageinteger

Total storage used in current month (bytes)

current_storageinteger

Current storage used (bytes)

total_monthly_billingnumber

Total cost in current month

command_countsobject[]

Command-specific counts over time

Loading search…