Managed Databases

Change 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 URL
    https://api.rafftechnologies.com
  • URL
    https://api.rafftechnologies.com/api/v1/databases/{database_id}/scale
  • Auth
    API 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

plan_idinteger

New plan ID (same engine). Omit or 0 to keep the current plan.

storage_gbinteger

New storage size in GB. Grows only — never below the plan's included allotment. Omit or 0 to keep the current size.

set_haboolean

Set to true to apply the has_ha value. When false or omitted, high availability is unchanged.

has_haboolean

Desired high availability state. Only applied when set_ha is true.

replica_countinteger

Desired read replica count. Always applied — pass your current count when not changing it. PostgreSQL only.

Response

Updated database

successboolean

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 moving enum 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

    • info

      added the non-success response with the status