Get Database Stats
Changed onThis endpoint gets detailed stats of a database.
Request
- Base URLhttps://api.upstash.com/v2
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The ID of the database
Query parameters
Period the time series cover: 1h, 3h, 12h, 1d, 3d, 7d or 30d. Defaults to 1h. 30d is only available for databases on a Pro plan or with the Production Pack.
Response
Database stats retrieved successfully
Example response
{
"monitor_count": {
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 320
},
"daily_net_commands": 7,
"daily_read_requests": 7,
"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
}
],
"latency_p50": [
{
"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_p50": [
{
"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_p50": [
{
"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_billing": 222.33902763855485,
"rest_conn_count": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"latency_p90": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"command_latency_p50": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"command_latency_99": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"wait_latency_99": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"disk_load_latency_99": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"disk_loads": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"lua_latency_p50": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"lua_latency_99": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
],
"slow_commands": [
{
"command": "EVALSHA"
}
],
"command_counts": [
{
"metric_identifier": "EXISTS",
"data_points": [
{
"x": "2025-08-31 15:12:52.799480932 +0000 UTC",
"y": 0
}
]
}
]
}Changes
- info
added the new optional
queryrequest parameterperiod - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
response property
total_monthly_script_requestsdeprecated
- info