Databases
Serverless SQL databases with branches and restore to a point in time.
/v1/db/projectsList databases#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
projectsDatabase[]requirednamestringrequiredhoststringrequiredportintegerrequiredpooled_portintegerthe pooled port (transaction pooling), 6432
databasestringrequireddatabase name for branch main; <branch>--<name> for others
userstringrequiredhistory_hoursintegermax_connectionsintegercreated_atstring (date-time)password_set_atstring (date-time)statusstringactive: ran in the last 3 minutes; idle: scaled to zero, starts on the next connection
one of
active,idle,movingstorage_change_pendingbooleana change to the database's storage waits for its next start; it keeps running meanwhile
projectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/db/projects" \
-H "Authorization: Bearer $KEY"- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Request bodyapplication/json
namestringrequiredone DNS label: lowercase letters, digits and hyphens, 1-63 characters, no
--pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
201DatabaseWithPassword
namestringrequiredhoststringrequiredportintegerrequiredpooled_portintegerthe pooled port (transaction pooling), 6432
databasestringrequireddatabase name for branch main; <branch>--<name> for others
userstringrequiredhistory_hoursintegermax_connectionsintegercreated_atstring (date-time)password_set_atstring (date-time)statusstringactive: ran in the last 3 minutes; idle: scaled to zero, starts on the next connection
one of
active,idle,movingstorage_change_pendingbooleana change to the database's storage waits for its next start; it keeps running meanwhile
projectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
branchstringpasswordstringrequiredshown once
connection_stringstringrequiredpooled_connection_stringstringthe same database through the pooled port
notestring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_name, storage_refused, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: storage_not_found |
| 409 | Conflict: name_taken, storage_busy, has_branches, archived |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: storage_bad_answer |
| 503 | Unavailable: storage_unreachable, storage_unavailable |
Example
curl -X POST "https://api.ibel.ai/v1/db/projects" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"shop"}'/v1/db/projects/{name}Get a database#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200Database
namestringrequiredhoststringrequiredportintegerrequiredpooled_portintegerthe pooled port (transaction pooling), 6432
databasestringrequireddatabase name for branch main; <branch>--<name> for others
userstringrequiredhistory_hoursintegermax_connectionsintegercreated_atstring (date-time)password_set_atstring (date-time)statusstringactive: ran in the last 3 minutes; idle: scaled to zero, starts on the next connection
one of
active,idle,movingstorage_change_pendingbooleana change to the database's storage waits for its next start; it keeps running meanwhile
projectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/db/projects/shop" \
-H "Authorization: Bearer $KEY"/v1/db/projects/{name}Delete a database#
With all its branches and history. Refused while a live version binds it (checked after the role and the name).
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: storage_refused |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found, storage_not_found |
| 409 | Conflict: bound, storage_busy, has_branches, archived |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: storage_bad_answer |
| 503 | Unavailable: storage_unreachable, storage_unavailable |
Example
curl -X DELETE "https://api.ibel.ai/v1/db/projects/shop" \
-H "Authorization: Bearer $KEY"/v1/db/projects/{name}/passwordNew password#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200DatabaseWithPassword
namestringrequiredhoststringrequiredportintegerrequiredpooled_portintegerthe pooled port (transaction pooling), 6432
databasestringrequireddatabase name for branch main; <branch>--<name> for others
userstringrequiredhistory_hoursintegermax_connectionsintegercreated_atstring (date-time)password_set_atstring (date-time)statusstringactive: ran in the last 3 minutes; idle: scaled to zero, starts on the next connection
one of
active,idle,movingstorage_change_pendingbooleana change to the database's storage waits for its next start; it keeps running meanwhile
projectsConnected[]namestringrequiredkindstringrequiredone of
function,appenvironmentsstring[]requiredbindingsstring[]required
branchstringpasswordstringrequiredshown once
connection_stringstringrequiredpooled_connection_stringstringthe same database through the pooled port
notestring
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/db/projects/shop/password" \
-H "Authorization: Bearer $KEY"/v1/db/projects/{name}/branchesList branches#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200object
branchesBranch[]requirednamestringrequiredkindstringrequiredone of
branch,preview,backuppreviewstringbackup_atstring (date-time)history_idstringthe id of the branch's current history; a restore gives it a new one
pattern
^[0-9a-f]{32}$parentstring | nullrequiredbranch_lsnstring | nulla position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$branch_timestring (date-time) | nullcreated_atstring (date-time)requiredrestored_atstring (date-time) | nullhead_lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$size_bytesinteger | nullthe branch's data size, history apart
storagestringone of
unavailable
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/db/projects/shop/branches" \
-H "Authorization: Bearer $KEY"/v1/db/projects/{name}/branchesMake a branch#
From from (default main) at at, at lsn, or at its latest state. At most 50 branches and previews.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
namestringrequiredone DNS label: lowercase letters, digits and hyphens, 1-63 characters, no
--pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersfromstringparent branch, default main
atstring (date-time)RFC 3339 time with a zone, e.g. 2026-11-04T09:30:00Z
lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$
Response
201Branch
namestringrequiredkindstringrequiredone of
branch,preview,backuppreviewstringbackup_atstring (date-time)history_idstringthe id of the branch's current history; a restore gives it a new one
pattern
^[0-9a-f]{32}$parentstring | nullrequiredbranch_lsnstring | nulla position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$branch_timestring (date-time) | nullcreated_atstring (date-time)requiredrestored_atstring (date-time) | nullhead_lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$size_bytesinteger | nullthe branch's data size, history apart
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_name, reserved_name, bad_from, bad_point, bad_time, time_in_future, bad_lsn, too_old, before_branch, lsn_ahead, too_new, no_data, storage_refused, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found, storage_not_found |
| 409 | Conflict: name_taken, too_many_branches, storage_busy, has_branches, archived |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: storage_bad_answer |
| 503 | Unavailable: storage_unreachable, storage_unavailable |
Example
curl -X POST "https://api.ibel.ai/v1/db/projects/shop/branches" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"shop"}'/v1/db/projects/{name}/branches/{branch}/restoreRestore a branch to a point in time#
The state before is kept as the backup branch <branch>-before-<time>; the restored branch is then detached from it (detached), so the backup can be deleted. At most 20 backups.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersbranchstringpathrequiredthe branch's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Request bodyapplication/json
one of at or lsn
atstring (date-time)RFC 3339 time with a zone, e.g. 2026-11-04T09:30:00Z
lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$
Response
200Restored
branchBranchrequirednamestringrequiredkindstringrequiredone of
branch,preview,backuppreviewstringbackup_atstring (date-time)history_idstringthe id of the branch's current history; a restore gives it a new one
pattern
^[0-9a-f]{32}$parentstring | nullrequiredbranch_lsnstring | nulla position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$branch_timestring (date-time) | nullcreated_atstring (date-time)requiredrestored_atstring (date-time) | nullhead_lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$size_bytesinteger | nullthe branch's data size, history apart
backupBranchrequirednamestringrequiredkindstringrequiredone of
branch,preview,backuppreviewstringbackup_atstring (date-time)history_idstringthe id of the branch's current history; a restore gives it a new one
pattern
^[0-9a-f]{32}$parentstring | nullrequiredbranch_lsnstring | nulla position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$branch_timestring (date-time) | nullcreated_atstring (date-time)requiredrestored_atstring (date-time) | nullhead_lsnstringa position in the database history, e.g. 0/1FA2728
pattern
^[0-9A-Fa-f]{1,8}/[0-9A-Fa-f]{1,8}$size_bytesinteger | nullthe branch's data size, history apart
detachedbooleanrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_point, bad_time, time_in_future, bad_lsn, too_old, before_branch, lsn_ahead, too_new, no_data, storage_refused, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found, storage_not_found |
| 409 | Conflict: backup_branch, too_many_backups, storage_busy, has_branches, archived |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: storage_bad_answer |
| 503 | Unavailable: storage_unreachable, storage_unavailable |
Example
curl -X POST "https://api.ibel.ai/v1/db/projects/shop/branches/dev/restore" \
-H "Authorization: Bearer $KEY" \
-d '{"at":"2026-11-04T09:30:00Z","lsn":"…"}'/v1/db/projects/{name}/branches/{branch}Delete a branch#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersbranchstringpathrequiredthe branch's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 characters
Response
200Deleted
namestringdeletedbooleanrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: storage_refused |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found, storage_not_found |
| 409 | Conflict: main_branch, in_use, has_branches, storage_busy, archived |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: storage_bad_answer |
| 503 | Unavailable: storage_unreachable, storage_unavailable |
Example
curl -X DELETE "https://api.ibel.ai/v1/db/projects/shop/branches/dev" \
-H "Authorization: Bearer $KEY"/v1/db/projects/{name}/observabilityCompute, size, connections, top statements#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
namestringpathrequiredthe database's name
pattern
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$· up to 63 charactersrangestringquery1h (1-minute steps), 24h (15 minutes) or 7d (2 hours); any other value is 400 bad_range
one of
1h,24h,7d· default"1h"
Response
200ResourceObservability
rangestringrequiredstepstringrequiredtotalsobjectrequiredmetricsobject[]requiredkeystringrequiredlabelstringrequiredunitstringrequired
seriesobject[]requiredtstring (date-time)
tablesobject[]databases only: the latest top statements
keystringlabelstringsampled_atstring (date-time)columnsobject[]keystringlabelstring
rowsobject[]
notestring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_range |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/db/projects/shop/observability" \
-H "Authorization: Bearer $KEY"