Managed Databases
Scale database
Changed onChange the plan, storage, high availability, or read replica count of a running database.
- Plan: the new plan must be the same engine. Its included storage sets a floor: storage never shrinks below the new tier's allotment.
- Storage: storage_gb can only grow. Omit (or 0) to keep the current size.
- High availability: set set_ha: true and put the desired state in has_ha. When set_ha is false or omitted, HA is unchanged. MySQL high availability is chosen at create: turning it on for a MySQL database without it returns 400.
- Read replicas: replica_count is always applied: pass your current count when you are not changing it. PostgreSQL only, 0 to 5; other engines reject a count above 0.
A free database can only move to a paid plan; its size is fixed. The database restarts briefly for plan, high availability and replica changes; growing storage needs no restart. Poll GET /api/v1/databases/{database_id} until status is back to running.
Billing
- Monthly database: a change that costs more is charged for the rest of the current month before it applies (account balance first, then the card); a change that costs less credits the unused part to the balance once it applies. The monthly price changes with it.
- Free database to a paid plan: the database becomes a monthly subscription and keeps its data, address and password. The first month is charged once the change applies; a card that can be charged automatically is required.
- Pay-as-you-go database: the new hourly price applies from the change.
post/api/v1/databases/{database_id}/scale
Request
- Base URLhttps://api.rafftechnologies.com
- URLhttps://api.rafftechnologies.com/api/v1/databases/{database_id}/scale
- AuthAPI key in header X-API-Key
Path parameters
database_idstring required
Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)
Request body
Response
Updated database
Example response
{
"database": {
"name": "orders-db",
"engine": "postgres",
"engine_version": "16",
"region": "us-east",
"plan_id": 5,
"storage_gb": 25,
"connection_host": "a1b2c3d4.db.raffusercloud.com",
"connection_port": 5432,
"billing_type": "payg",
"price_per_hour": 0.010945,
"monthly_price": 7.99,
"public_port": 20104,
"public_dns_hostname": "a1b2c3d4.public.db.raffusercloud.com",
"public_allowlist": [
"203.0.113.0/24"
]
}
}Changes
- warning
added the new
movingenum value to the/response property for the response status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- warning
- info
added the non-success response with the status
- info