Chelabase
ManagementData api

Serve a Postgres database through the data API

POST
/v1/databases/{id}/branches/{branch_id}/pg-databases/{name}/data-api

Marks the database enabling and asks the worker to bootstrap it; the answer is 202 at once. Poll the branch's databases for data_api: on, or error with the reason. Pressing it again retries a failed or stuck enable. A database already on answers 200 and nothing runs. The branch serves at most CHELABASE_BRANCH_DATA_API_DATABASE_CAP databases (default 10, main included).

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Database id

Formatuuid
branch_id*string

Branch id

Formatuuid
name*string

The Postgres database's name

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/pg-databases/string/data-api"
{  "data_api": "off",  "data_api_error": "string",  "default_schema": "string",  "main": true,  "name": "string",  "origin": "main",  "owner": "string"}