Databases
List, create, read and delete a project's database.
The database object
| Field | Type | |
|---|---|---|
id | uuid | Use it in every other call |
projectId | uuid | The project the database belongs to |
name | string | Named after the project. Deleting needs it as confirmation |
status | string | provisioning, running, suspended or error |
postgresVersion | number | e.g. 17 |
region | string | Where it runs, e.g. Singapore |
databaseName, user | string | helipod_db and helipod_db_owner |
plan | object | code, name, tier (free or paid), computeHoursIncluded, computeHoursRemaining, storageGbIncluded, storageGbRemaining. The hours and GB are null on the free plan |
compute | object | minCu, maxCu, suspendTimeoutSeconds, see Plans and scaling |
branches | array | One per environment, see Branches |
createdAt | string | ISO 8601 |
List
GET
/databasesDatabases in the projects the key can reach.
curl https://api.helipod.io/api/databases -H "Authorization: Bearer hel_your_key"Create
POST
/databasesCreates the project's database on the free plan. Returns
201.Prop
Type
- A project has at most one database. If it already has one, that database is returned and nothing new is created.
- Send an
Idempotency-Keyheader when you might retry the request. - Every environment the project already has gets its own branch right away; production is the primary.
- An account can have up to 20 databases (
402 DATABASE_LIMIT).
curl -X POST https://api.helipod.io/api/databases \
-H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
-H "Idempotency-Key: create-db-shop" \
-d '{ "projectId": "3b0cd5ac-ac26-4012-9b28-17466f73788c" }'Get
GET
/databases/{databaseId}Delete
DELETE
/databases/{databaseId}Deletes the database with all its data and branches. This can't be undone.
Prop
Type
curl -X DELETE https://api.helipod.io/api/databases/$DB \
-H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
-d '{ "confirm": "my-shop" }'{ "success": true, "data": { "deleted": true, "id": "9a41c0de-52b1-4f0e-9d0b-3f6c7e2a1b88" } }A wrong or missing name answers 400 CONFIRMATION_REQUIRED, and the message tells you the expected value. Unused credits of a paid plan are not refunded.
Suspend and resume
POST
/databases/{databaseId}/suspendStops the database's compute. Connections fail until you resume it. Data is kept.
POST
/databases/{databaseId}/resumeStarts it again.
Both return the database object. A database also suspends itself when its paid credits run out; top up with upgrade and resume it.