HelipodDocs

Databases

List, create, read and delete a project's database.

The database object

FieldType
iduuidUse it in every other call
projectIduuidThe project the database belongs to
namestringNamed after the project. Deleting needs it as confirmation
statusstringprovisioning, running, suspended or error
postgresVersionnumbere.g. 17
regionstringWhere it runs, e.g. Singapore
databaseName, userstringhelipod_db and helipod_db_owner
planobjectcode, name, tier (free or paid), computeHoursIncluded, computeHoursRemaining, storageGbIncluded, storageGbRemaining. The hours and GB are null on the free plan
computeobjectminCu, maxCu, suspendTimeoutSeconds, see Plans and scaling
branchesarrayOne per environment, see Branches
createdAtstringISO 8601

List

GET/databases
Databases in the projects the key can reach.
curl https://api.helipod.io/api/databases -H "Authorization: Bearer hel_your_key"

Create

POST/databases
Creates 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-Key header 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}/suspend
Stops the database's compute. Connections fail until you resume it. Data is kept.
POST/databases/{databaseId}/resume
Starts 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.

On this page