/v1/databases/{uid}/resizeMoves the database to another plan of the same engine and returns 202 Accepted. The
database must be ready. It switches to provisioning, is restarted with the new CPU and
memory, and returns to ready when the operation succeeds (or failed if it fails).
Follow it with Get an operation.
- Billing switches to the new plan's rate straight away. Usage up to now is charged at the old rate first.
- Storage only grows. If the new plan includes more storage, the disk grows to match. A plan with less included storage than the database already has is rejected.
- Expect a short interruption while the database restarts.
X-Idempotency is optional. A retry with the same key returns the original operation with
200 OK and is_replay: true, even once the resize has finished. The body is not
compared, so a retry with another plan_slug also returns the original resize.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe database's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
X-IdempotencystringOptional unique key for this request, such as a UUID. Leading and trailing spaces are
trimmed. If you send a key you already used for the same action on the same resource, the
original operation is returned with 200 OK, is_replay: true and the
X-Idempotency-Replay header, and nothing new is queued. The replay is checked before the
resource's current state, so a retry after the first request finished still gets the
original result. Reusing a key for a different action or resource returns 409 with
action: idempotency_key_reused. Keys are scoped to you and the workspace and shared by
every resource type. Without a key, every request queues a new operation.
Request body
plan_slugstringRequiredSlug of an available plan for the database's engine. Case-insensitive. Must differ from the current plan.
Response
The resize was queued. database already shows the new plan's size.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Poll it with Get an operation.
databaseobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the database.
namestringRequiredDisplay name.
slugstringRequiredURL-safe version of the name. Not necessarily unique.
enginestringRequiredDatabase engine. redis runs Valkey.
One ofpostgresmysqlredis
versionstringEngine version. Omitted when unknown.
statusstringRequiredLifecycle state. provisioning while being created, resized, restored or restarted,
ready when usable, deleting while being deleted and failed when the last create,
resize, restore, restart or delete failed. deleted only appears in an idempotent replay
of a delete.
stopped means the platform stopped the database because the account was suspended
for non-payment. A ready database switches to stopped as soon as the stop is queued
(compute billing stops), and stays stopped while the account is suspended. Within about
a minute of the account becoming active again it is restarted: it goes through
provisioning back to ready (or failed if the restart fails). While stopped,
actions that need a ready database (resize, password rotation, snapshots, the data
browser) return 409. If the stop itself fails, the database stays ready and the stop
is retried.
One ofprovisioningreadystoppeddeletingdeletedfailed
display_statusstringRequiredStatus to show in user interfaces. Currently the same values as status.
plan_slugstringSlug of the database's plan. Omitted when the plan is unknown.
zone_slugstringRequiredZone the database runs in.
storage_gibintegerRequiredProvisioned storage in GiB.
vcpuintegerRequiredWhole vCPUs of the plan.
cpu_limit_millisintegerCPU cap in millicores. Omitted when not set.
memory_mibintegerRequiredMemory in MiB.
hoststringPublic hostname. Omitted for private MySQL and Redis databases.
portintegerEngine port: 5432 (PostgreSQL), 3306 (MySQL) or 6379 (Redis). Public MySQL and Redis clients connect to public_port instead.
database_namestringName of the database inside the engine. Omitted for Redis.
usernamestringDatabase user.
passwordstringThe database password. Only returned when a database is created, never by list or get.
connection_stringstringPublic connection URL (postgresql://…?sslmode=require, mysql://… or rediss://…).
Contains the password only in the create response. Omitted when the database has no
public hostname.
internal_hoststringPrivate hostname, reachable only from workloads running on RumptyCloud in the same zone.
internal_connection_stringstringPrivate connection URL using internal_host (Redis uses plain redis://). Contains the password only in the create response. Omitted when internal_host is not known.
public_accessbooleanRequiredWhether public access was requested. MySQL and Redis databases only have a public endpoint when this is true.
public_portintegerPublic port for MySQL and Redis databases with public access, in the range 30000–40000. Omitted otherwise.
created_atstring (date-time)RequiredWhen the database was created.
statusstringRequiredStatus of the operation. queued for a new request; the original operation's status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Response
Replay. The X-Idempotency key was already used for this action, so the existing
operation is returned and nothing is queued. status is the operation's status and
database is the database as it is now (status: deleted once it is gone). The password
is never included.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Poll it with Get an operation.
databaseobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the database.
namestringRequiredDisplay name.
slugstringRequiredURL-safe version of the name. Not necessarily unique.
enginestringRequiredDatabase engine. redis runs Valkey.
One ofpostgresmysqlredis
versionstringEngine version. Omitted when unknown.
statusstringRequiredLifecycle state. provisioning while being created, resized, restored or restarted,
ready when usable, deleting while being deleted and failed when the last create,
resize, restore, restart or delete failed. deleted only appears in an idempotent replay
of a delete.
stopped means the platform stopped the database because the account was suspended
for non-payment. A ready database switches to stopped as soon as the stop is queued
(compute billing stops), and stays stopped while the account is suspended. Within about
a minute of the account becoming active again it is restarted: it goes through
provisioning back to ready (or failed if the restart fails). While stopped,
actions that need a ready database (resize, password rotation, snapshots, the data
browser) return 409. If the stop itself fails, the database stays ready and the stop
is retried.
One ofprovisioningreadystoppeddeletingdeletedfailed
display_statusstringRequiredStatus to show in user interfaces. Currently the same values as status.
plan_slugstringSlug of the database's plan. Omitted when the plan is unknown.
zone_slugstringRequiredZone the database runs in.
storage_gibintegerRequiredProvisioned storage in GiB.
vcpuintegerRequiredWhole vCPUs of the plan.
cpu_limit_millisintegerCPU cap in millicores. Omitted when not set.
memory_mibintegerRequiredMemory in MiB.
hoststringPublic hostname. Omitted for private MySQL and Redis databases.
portintegerEngine port: 5432 (PostgreSQL), 3306 (MySQL) or 6379 (Redis). Public MySQL and Redis clients connect to public_port instead.
database_namestringName of the database inside the engine. Omitted for Redis.
usernamestringDatabase user.
passwordstringThe database password. Only returned when a database is created, never by list or get.
connection_stringstringPublic connection URL (postgresql://…?sslmode=require, mysql://… or rediss://…).
Contains the password only in the create response. Omitted when the database has no
public hostname.
internal_hoststringPrivate hostname, reachable only from workloads running on RumptyCloud in the same zone.
internal_connection_stringstringPrivate connection URL using internal_host (Redis uses plain redis://). Contains the password only in the create response. Omitted when internal_host is not known.
public_accessbooleanRequiredWhether public access was requested. MySQL and Redis databases only have a public endpoint when this is true.
public_portintegerPublic port for MySQL and Redis databases with public access, in the range 30000–40000. Omitted otherwise.
created_atstring (date-time)RequiredWhen the database was created.
statusstringRequiredStatus of the operation. queued for a new request; the original operation's status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress.
is_replaybooleanRequiredtrue when an existing operation was returned for a reused X-Idempotency key.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Errors
| Status | Meaning |
|---|---|
400 | Validation failed. Possible messages: invalid request (malformed JSON or missing plan_slug), plan_slug is required, invalid database plan, selected plan is not available for this database engine, This database is already on the <plan> plan., or the storage message (The <plan> plan includes <n> GiB of storage but this database already has <m> GiB provisioned. Choose a plan with at least <m> GiB of storage.). |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The resource does not exist or you cannot access it. |
409 | The database is not ready (database is not available for this action), for example while it is provisioning or stopped because the account is suspended. Also returned when the X-Idempotency key was already used for a different operation (action: idempotency_key_reused). |
Errors use the standard error format.