curl -X GET \
https://api.upstash.com/v2/redis/stats/:id \
-u 'EMAIL:API_KEY'
import requests
response = requests.get('https://api.upstash.com/v2/redis/stats/:id', auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.upstash.com/v2/redis/stats/:id", nil)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"connection_count": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 320
},
...
],
"keyspace": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 344725564
},
...
],
"throughput": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 181.88333333333333
},
...
],
"produce_throughput": null,
"consume_throughput": null,
"diskusage": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 532362818323
},
...
],
"latencymean": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 0.176289
},
...
],
"read_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"hits": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"misses": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 82.53333333333333
},
...
],
"write": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 99.35
},
...
],
"dailyrequests": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 68844080
},
...
],
"days": [
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Monday"
],
"dailybilling": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 145.72694911244588
},
...
],
"dailybandwidth": 50444740913,
"bandwidths": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 125391861729
},
...
],
"dailyproduce": null,
"dailyconsume": null,
"total_monthly_requests": 1283856937,
"total_monthly_read_requests": 1034567002,
"total_monthly_write_requests": 249289935,
"total_monthly_storage": 445942383672,
"total_monthly_billing": 222.33902763855485,
"total_monthly_produce": 0,
"total_monthly_consume": 0
}
Redis
Get Database Stats
This endpoint gets detailed stats of a database.
GET
/
v2
/
redis
/
stats
/
{id}
curl -X GET \
https://api.upstash.com/v2/redis/stats/:id \
-u 'EMAIL:API_KEY'
import requests
response = requests.get('https://api.upstash.com/v2/redis/stats/:id', auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.upstash.com/v2/redis/stats/:id", nil)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"connection_count": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 320
},
...
],
"keyspace": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 344725564
},
...
],
"throughput": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 181.88333333333333
},
...
],
"produce_throughput": null,
"consume_throughput": null,
"diskusage": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 532362818323
},
...
],
"latencymean": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 0.176289
},
...
],
"read_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"hits": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"misses": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 82.53333333333333
},
...
],
"write": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 99.35
},
...
],
"dailyrequests": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 68844080
},
...
],
"days": [
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Monday"
],
"dailybilling": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 145.72694911244588
},
...
],
"dailybandwidth": 50444740913,
"bandwidths": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 125391861729
},
...
],
"dailyproduce": null,
"dailyconsume": null,
"total_monthly_requests": 1283856937,
"total_monthly_read_requests": 1034567002,
"total_monthly_write_requests": 249289935,
"total_monthly_storage": 445942383672,
"total_monthly_billing": 222.33902763855485,
"total_monthly_produce": 0,
"total_monthly_consume": 0
}
URL Parameters
string
required
The ID of the database
Response Parameters
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
Object
int
The total daily bandwidth usage (in bytes).
Object
Array<string>
A list of the days of the week for the measurement
Object
int
Total number of daily produced commands
int
Total number of daily consumed commands
int
The total number of requests made in the current month.
int
The total number of read requests made in the current month.
int
The total number of write requests made in the current month.
int
The total amount of storage used (in bytes) in the current month.
int
Total cost of the database in the current month
int
Total number of produce commands in the current month
int
Total number of consume commands in the current month
curl -X GET \
https://api.upstash.com/v2/redis/stats/:id \
-u 'EMAIL:API_KEY'
import requests
response = requests.get('https://api.upstash.com/v2/redis/stats/:id', auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.upstash.com/v2/redis/stats/:id", nil)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"connection_count": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 320
},
...
],
"keyspace": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 344725564
},
...
],
"throughput": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 181.88333333333333
},
...
],
"produce_throughput": null,
"consume_throughput": null,
"diskusage": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 532362818323
},
...
],
"latencymean": [
{
"x": "2023-05-22 10:59:23.426 +0000 UTC",
"y": 0.176289
},
...
],
"read_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_mean": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"write_latency_99": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"hits": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"misses": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 0
},
...
],
"read": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 82.53333333333333
},
...
],
"write": [
{
"x": "2023-05-22 11:00:23.426 +0000 UTC",
"y": 99.35
},
...
],
"dailyrequests": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 68844080
},
...
],
"days": [
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Monday"
],
"dailybilling": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 145.72694911244588
},
...
],
"dailybandwidth": 50444740913,
"bandwidths": [
{
"x": "2023-05-18 11:58:23.534505371 +0000 UTC",
"y": 125391861729
},
...
],
"dailyproduce": null,
"dailyconsume": null,
"total_monthly_requests": 1283856937,
"total_monthly_read_requests": 1034567002,
"total_monthly_write_requests": 249289935,
"total_monthly_storage": 445942383672,
"total_monthly_billing": 222.33902763855485,
"total_monthly_produce": 0,
"total_monthly_consume": 0
}
Was this page helpful?
⌘I