Skip to Content
APIManaged Databases

Managed Databases API

API endpoints for creating and managing PostgreSQL, Redis, and ClickHouse instances.


PostgreSQL

List databases

GET /v1/databases

Returns all PostgreSQL instances for the authenticated user.

Example

curl https://api.redu.cloud/v1/databases \ -H "x-api-key: YOUR_API_KEY"

Create database

POST /v1/databases

Request body

FieldTypeRequiredDescription
namestringIdentifier (lowercase, hyphens)
db_namestringDatabase name (default: app)
db_userstringDatabase user (default: appuser)
db_passwordstringPassword, auto-generated if omitted
version"16" | "15" | "14"PostgreSQL version (default: "16")
flavor_idstringServer size ID, use List flavors
network_idstringPrivate network ID, use List networks
keypair_namestringSSH keypair name, use List keypairs
security_group_namesstring[]Defaults to ["default"]
extensionsstring[]PostgreSQL extensions to install at provision time. Allowlist: pgvector (alias vector), postgis, pgaudit, pg_stat_statements, hstore, pg_trgm, uuid-ossp, citext, pgcrypto, ltree, btree_gin, btree_gist
superuserbooleanGrant the database user superuser privileges (default false)
habooleanProvision three machines with automatic failover instead of one (default false). Roughly triples the cost, so it is never enabled for you. See Database high availability

Response, the password is returned once and not stored in plain text.

{ "id": 1, "name": "my-db", "db_name": "app", "db_user": "appuser", "db_password": "the-plaintext-password-shown-once", "db_version": "16", "status": "provisioning", "floating_ip": null, "port": 5432, "created_at": "2026-05-30T12:00:00Z" }

Get database

GET /v1/databases/:id

Delete database

DELETE /v1/databases/:id

Returns 204 No Content.


Redis

List Redis instances

GET /v1/redis

Create Redis instance

POST /v1/redis

Request body

FieldTypeRequiredDescription
namestringIdentifier (lowercase, hyphens)
passwordstringAuto-generated if omitted
version"7" | "6"Redis version (default: "7")
flavor_idstringServer size ID
network_idstringPrivate network ID
keypair_namestringSSH keypair name
security_group_namesstring[]Defaults to ["default"]

Response

{ "id": 1, "name": "my-cache", "version": "7", "password": "the-plaintext-password-shown-once", "status": "provisioning", "floating_ip": null, "port": 6379, "created_at": "2026-05-30T12:00:00Z" }

Get Redis instance

GET /v1/redis/:id

Delete Redis instance

DELETE /v1/redis/:id

Returns 204 No Content.


ClickHouse

ClickHouse is a column-oriented database for analytics (OLAP). It is a distinct managed resource, HTTP on port 8123.

List ClickHouse instances

GET /v1/clickhouse

Create ClickHouse instance

POST /v1/clickhouse

Request body

FieldTypeRequiredDescription
namestringIdentifier (lowercase, hyphens)
db_namestringDatabase name (default: analytics)
db_userstringDatabase user (default: appuser)
db_passwordstringPassword, auto-generated if omitted
flavor_idstringServer size ID, use List flavors
network_idstringPrivate network ID, use List networks
keypair_namestringSSH keypair name, use List keypairs
security_group_namesstring[]Defaults to ["default"]
habooleanProvision three replicas behind a load balancer instead of one machine (default false). Roughly triples the cost. See Database high availability

Response, the password is returned once.

{ "id": 1, "name": "my-analytics", "db_name": "analytics", "db_user": "appuser", "db_password": "the-plaintext-password-shown-once", "status": "provisioning", "floating_ip": null, "port": 8123, "created_at": "2026-05-30T12:00:00Z" }

Get ClickHouse instance

GET /v1/clickhouse/:id

Delete ClickHouse instance

DELETE /v1/clickhouse/:id

Returns 204 No Content.


High availability

POST /v1/databases and POST /v1/clickhouse accept "ha": true, which provisions three machines with automatic failover instead of one, behind a single load balancer address. Connect to that address rather than to any individual member: it is what stays valid when a machine dies.

/v1/redis and /v1/relational-databases (MySQL, MariaDB) do not accept the field. Sending it there fails validation rather than returning a single machine you might believe is redundant.

It roughly triples the cost of the resource, so it is never a default and never inferred from the flavor. If you are calling this on a user’s behalf, show them the cost before you send the request.

Behaviour during a real machine loss, with the measured numbers and the limits: Database high availability.


Status values

StatusMeaning
provisioningServer is being created. Poll every 15–30s.
readyServer is up and accepting connections.
errorProvisioning failed.
Last updated on