Skip to main content
POST
/
redis
/
rename
/
{id}
Rename Database
curl --request POST \
  --url https://api.upstash.com/v2/redis/rename/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
import requests

url = "https://api.upstash.com/v2/redis/rename/{id}"

payload = { "name": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};

fetch('https://api.upstash.com/v2/redis/rename/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upstash.com/v2/redis/rename/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.upstash.com/v2/redis/rename/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.upstash.com/v2/redis/rename/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.upstash.com/v2/redis/rename/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "database_id": "96ad0856-03b1-4ee7-9666-e81abd0349e1",
  "database_name": "MyRedis",
  "region": "global",
  "port": 6379,
  "creation_time": 1752649602,
  "state": "active",
  "endpoint": "beloved-stallion-58500",
  "tls": true,
  "db_max_clients": 10000,
  "db_max_request_size": 10485760,
  "db_disk_threshold": 107374182400,
  "db_max_entry_size": 104857600,
  "db_memory_threshold": 3221225472,
  "db_max_commands_per_second": 10000,
  "db_request_limit": 8024278031528737000,
  "type": "paid",
  "budget": 360,
  "primary_region": "us-east-1",
  "primary_members": [
    "us-east-1"
  ],
  "all_members": [
    "us-east-1"
  ],
  "eviction": false,
  "auto_upgrade": false,
  "consistent": false,
  "modifying_state": "",
  "db_resource_size": "L",
  "db_type": "pebble",
  "db_conn_idle_timeout": 21600000000000,
  "db_lua_timeout": 250000000,
  "db_lua_credits_per_min": 10000000000,
  "db_store_max_idle": 900000000000,
  "db_max_loads_per_sec": 1000000,
  "db_acl_enabled": "false",
  "db_acl_default_user_status": "true",
  "db_eviction": false,
  "last_plan_upgrade_time": 0,
  "replicas": 5,
  "customer_id": "example@upstash.com",
  "daily_backup_enabled": false,
  "read_regions": [
    "us-east-2"
  ],
  "securityAddons": {
    "ipWhitelisting": false,
    "vpcPeering": false,
    "privateLink": false,
    "tlsMutualAuth": false,
    "encryptionAtRest": false
  },
  "prometheus_enabled": "false",
  "prod_pack_enabled": false
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The ID of the database to be renamed

Body

application/json
name
string
required

The new name of the database

Response

200 - application/json

Database renamed successfully

database_id
string

ID of the database

Example:

"96ad0856-03b1-4ee7-9666-e81abd0349e1"

database_name
string

Name of the database

Example:

"MyRedis"

region
enum<string>

The region where database is hosted

Available options:
global
Example:

"global"

port
integer<int64>

Database port for clients to connect

Example:

6379

creation_time
integer<int64>

Creation time of the database as Unix time

Example:

1752649602

state
enum<string>

State of database

Available options:
active,
suspended,
passive
Example:

"active"

endpoint
string

Endpoint identifier or hostname of the database (may be a slug like "beloved-stallion-58500" or a full host)

Example:

"beloved-stallion-58500"

tls
boolean

TLS/SSL is enabled or not

Example:

true

db_max_clients
integer<int64>

Max number of concurrent clients can be opened on this database currently

Example:

10000

db_max_request_size
integer<int64>

Max size of a request that will be accepted by the database currently(in bytes)

Example:

10485760

db_disk_threshold
integer<int64>

Total disk size limit that can be used for the database currently(in bytes)

Example:

107374182400

db_max_entry_size
integer<int64>

Max size of an entry that will be accepted by the database currently(in bytes)

Example:

104857600

db_memory_threshold
integer<int64>

Max size of a memory the database can use(in bytes)

Example:

3221225472

db_max_commands_per_second
integer<int64>

Max number of commands can be sent to the database per second

Example:

10000

db_request_limit
integer<int64>

Total number of commands can be sent to the database

Example:

8024278031528737000

type
enum<string>

Payment plan of the database

Available options:
free,
payg,
pro,
paid
Example:

"paid"

budget
integer<int64>

Allocated monthly budget for the database

Example:

360

primary_region
enum<string>

Primary region of the database cluster

Available options:
us-east-1,
us-east-2,
us-west-1,
us-west-2,
ca-central-1,
eu-central-1,
eu-west-1,
eu-west-2,
sa-east-1,
ap-south-1,
ap-northeast-1,
ap-southeast-1,
ap-southeast-2,
af-south-1,
us-central1,
us-east4,
europe-west1,
asia-northeast1
Example:

"us-east-1"

primary_members
string[]

List of primary regions in the database cluster

Example:
["us-east-1"]
all_members
string[]

List of all regions in the database cluster

Example:
["us-east-1"]
eviction
boolean

Entry eviction is enabled

Example:

false

auto_upgrade
boolean

Automatic upgrade capability is enabled

Example:

false

consistent
boolean

Strong consistency mode is enabled

Example:

false

modifying_state
string

Current modifying state of the database

Example:

""

db_resource_size
enum<string>

Resource allocation tier

Available options:
S,
M,
L,
XL,
XXL,
3XL
Example:

"L"

db_type
enum<string>

Database storage engine type

Available options:
bolt,
badger,
pebble
Example:

"pebble"

db_conn_idle_timeout
integer<int64>

Connection idle timeout in nanoseconds

Example:

21600000000000

db_lua_timeout
integer<int64>

Lua script execution timeout in nanoseconds

Example:

250000000

db_lua_credits_per_min
integer<int64>

Lua script execution credits per minute

Example:

10000000000

db_store_max_idle
integer<int64>

Store connection idle timeout in nanoseconds

Example:

900000000000

db_max_loads_per_sec
integer<int64>

Maximum load operations per second

Example:

1000000

db_acl_enabled
enum<string>

Access Control List enabled status

Available options:
true,
false
Example:

"false"

db_acl_default_user_status
enum<string>

Default user access status in ACL

Available options:
true,
false
Example:

"true"

db_eviction
boolean

Database-level eviction policy status

Example:

false

last_plan_upgrade_time
integer<int64>

Unix timestamp of the last plan upgrade

Example:

0

replicas
integer

Replica factor of the database

Example:

5

customer_id
string

Owner identifier of the database (may be email or marketplace-scoped email)

Example:

"example@upstash.com"

daily_backup_enabled
boolean

Whether daily backup is enabled

Example:

false

read_regions
string[]

Array of read regions of the database

Example:
["us-east-2"]
securityAddons
object

Security add-ons and their enablement status

Example:
{
"ipWhitelisting": false,
"vpcPeering": false,
"privateLink": false,
"tlsMutualAuth": false,
"encryptionAtRest": false
}
prometheus_enabled
enum<string>

Prometheus integration enabled status

Available options:
true,
false
Example:

"false"

prod_pack_enabled
boolean

Production pack enabled status

Example:

false