Groundfloor Docs

Managed databases API

Provision, scale, back up, and restore dedicated managed PostgreSQL databases.

Base path: /v1/workspaces/{workspace_id}/managed-databases

Credentials are stored in Secrets — responses never return raw passwords.

See also: Databases

Create / list

MethodPathPermissionNotes
POST/v1/workspaces/{workspace_id}/managed-databaseswrite202 — body: engine (postgresql — the only engine offered; any other engine is 400), name, resource_tier (small|medium — CPU/memory/storage sizing only; single-replica, no HA tier exists yet)
GETsamereadList clusters

Create returns { "managed_database_id": "…", "run_id": "…" }; poll the run to follow progress. resource_tier defaults to small. Once it's ready, a new database gets a daily backup schedule with 30-day retention, where backups are available on the cell.

Each database also has dataplane_status (connected, not_connected, or null while it isn't up) and dataplane_connection_name, the name to pass as connection to the Data Vault API. If it's not_connected, call POST …/{id}/dataplane/register: it returns dataplane_status, dataplane_connection_name and, when it still fails, a short detail. It returns 409 if the database isn't up, and has its own rate limit (10 per minute by default).

Names: 2 to 40 characters, starting with a lowercase letter, then lowercase letters, digits and hyphens, ending with a letter or digit. The names of built-in data connectors (for example postgresql, mongodb, redis) are reserved. Invalid or reserved names return 422.

Errors on create:

StatusMeaning
400Engine isn't offered
409Name already in use in the workspace, or the workspace has reached its managed-database limit. The name conflict body has error_code managed_database_name_conflict. When the plan sets the limit, the response has the header X-Groundfloor-Reason: plan_limit and a detail naming the plan, such as Your Indie plan allows up to 1 managed database per workspace (1 in use). Contact us to change your plan.
422Name is invalid or reserved
503Managed databases aren't enabled in this environment

Managed-database limit: the lower of your plan's limit (Free: none, Indie: 1, Business: 5 per workspace) and your cell's maximum per workspace (5 by default). Databases that are deleted or failed to create don't count. On Free every create returns 409 with plan_limit; use the shared database. GET /v1/workspaces/{workspace_id}/limits returns the limit and how many count against it.

Rate limits (defaults, per client address; 429 when exceeded): create 5 per minute, delete 10, scale 5, backup 5, restore 3, rotate credentials 2.

Get / scale / delete

MethodPathPermissionNotes
GET…/{id}read
POST…/{id}/dataplane/registerwriteRetry connecting the database to the data API. 200 with the result
PATCH…/{id}write202 — { "resource_tier": "medium" }
DELETE…/{id}delete202 — backup_disposition: retain_30d | delete_now
GET…/{id}/runs/{run_id}readPoll async saga

When a run fails, its last_error is a short fixed message saying what failed and what to do, ending with Reference: err_<12 hex characters>., for example Resizing the database failed. It is still running at its previous size. Try again; if it keeps failing, contact support with this reference. Reference: err_3f9a1c0b7d2e. It never contains raw internal error text. A failed backup's last_error follows the same pattern. Runs and backups that failed before this format show the same kind of message, with the run's or backup's ID as the reference. Show the message to your users as it is, and quote the reference when you contact support. Don't parse the wording; it can change.

Backups and restore

MethodPathPermission
POST / GET…/{id}/backupswrite / read
GET / DELETE…/{id}/backups/{backup_id}read / delete
PUT / GET…/{id}/backup-schedulewrite / read
POST…/{id}/restorewrite (202)

An on-demand backup fails straight away with a clear message when backups aren't available on the cell. Backup create takes an optional retention_period, a number followed by d (days) or h (hours), such as 30d or 12h, up to 365 days. Omitting it uses the platform default.

Restore body: backup_id, new_name, optional resource_tier, restore_time (PITR — restore to any timestamp within the retention window; omit to restore the backup as taken).

A restore, including from a retained backup, creates a new database, so it counts against the managed-database limit like a create and returns the same 409 at the limit.

Retained (orphan) backups:

MethodPathPermission
GET…/retained-backupsread
POST…/retained-backups/restorewrite (202)

Rotate credentials

POST /v1/workspaces/{workspace_id}/managed-databases/{id}/rotate-credentials

Permission: write · 202 Accepted