Redis
Create a Redis Database
- Getting Started
- OpenAPI Specification
- Authentication
- HTTP Status Codes
- Redis
- POSTCreate a Redis Database (Regional - DEPRECATED)
- POSTCreate a Redis Database
- DELDelete Database
- GETList Databases
- GETGet Database
- GETGet Database Stats
- POSTUpdate Regions (Global)
- POSTReset Password
- POSTRename Database
- POSTEnable TLS
- POSTEnable Eviction
- POSTDisable Eviction
- POSTEnable Auto Upgrade
- POSTDisable Auto Upgrade
- POSTMove To Team
- Backup
- POST
- Vector
- Teams
- DevOps
Redis
Create a Redis Database
This endpoint creates a new Redis database.
POST
/
v2
/
redis
/
database
curl --request POST \
--url https://api.upstash.com/v2/redis/database \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"region": "global",
"primary_region": "us-east-1",
"read_regions": [
"us-east-1"
],
"tls": true
}'
{
"database_id": {
"type": "string",
"example": "93e3a3e-342c-4683-ba75-344c08ae143b"
},
"database_name": {
"type": "string",
"example": "global-test"
},
"database_type": {
"type": "string",
"example": "Pay as You Go"
},
"region": {
"type": "string",
"example": "global"
},
"port": {
"type": "integer",
"example": 32559
},
"creation_time": {
"type": "integer",
"example": 1674596896
},
"state": {
"type": "string",
"example": "active"
},
"password": {
"type": "string",
"example": "dd1803832a2746309e118373549e574d"
},
"user_email": {
"type": "string",
"example": "support@upstash.com"
},
"endpoint": {
"type": "string",
"example": "steady-stud-32559.upstash.io"
},
"tls": {
"type": "boolean",
"example": false
},
"rest_token": {
"type": "string",
"example": "AX8vACQgOTMyY2UyYy00NjgzLWJhNzUtMzQ0YzA4YWUxNDNiZMyYTI3NDYzMDllMTE4MzczNTQ5ZTU3NGQ="
},
"read_only_rest_token": {
"type": "string",
"example": "An8vACQg2UtMzQyYy00NjgzLWJhNzUtMzQ0YzA4YBVsUsyn19xDnTAvjbsiq79GRDrURNLzIYIOk="
}
}
Authorizations
Basic authentication using email and API key
Body
application/json
Response
200 - application/json
Database created successfully
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.upstash.com/v2/redis/database \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"region": "global",
"primary_region": "us-east-1",
"read_regions": [
"us-east-1"
],
"tls": true
}'
{
"database_id": {
"type": "string",
"example": "93e3a3e-342c-4683-ba75-344c08ae143b"
},
"database_name": {
"type": "string",
"example": "global-test"
},
"database_type": {
"type": "string",
"example": "Pay as You Go"
},
"region": {
"type": "string",
"example": "global"
},
"port": {
"type": "integer",
"example": 32559
},
"creation_time": {
"type": "integer",
"example": 1674596896
},
"state": {
"type": "string",
"example": "active"
},
"password": {
"type": "string",
"example": "dd1803832a2746309e118373549e574d"
},
"user_email": {
"type": "string",
"example": "support@upstash.com"
},
"endpoint": {
"type": "string",
"example": "steady-stud-32559.upstash.io"
},
"tls": {
"type": "boolean",
"example": false
},
"rest_token": {
"type": "string",
"example": "AX8vACQgOTMyY2UyYy00NjgzLWJhNzUtMzQ0YzA4YWUxNDNiZMyYTI3NDYzMDllMTE4MzczNTQ5ZTU3NGQ="
},
"read_only_rest_token": {
"type": "string",
"example": "An8vACQg2UtMzQyYy00NjgzLWJhNzUtMzQ0YzA4YBVsUsyn19xDnTAvjbsiq79GRDrURNLzIYIOk="
}
}