Galon Cloud
Galon API v1

/backend/hosted/databases

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

POST /backend/hosted/databases

Create a hosted database

Create a hosted PostgreSQL database in one step. Use when the app needs a database. Before: list_databases (needs database read access). Returns the database and, this once, its connection url: store it as an environment secret, never print it. Scope: database:create ; the project balance must cover 24 hours.

API key (Bearer), on the public API endpoint.

Parameters

NameInTypeDescription
Idempotency-Keyheaderstring · required

Request body

application/json

FieldTypeDescription
namestring · requiredDatabase name: 3 to 40 lowercase letters, digits and hyphens.

Responses

StatusDescriptionBody
2XXSuccess: the JSON body the route returns (see the description for its fields).object
401Key missing or invalidError
4XXRefused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).Error

Examples

curl

curl -X POST "$GALON_API_BASE/backend/hosted/databases" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Idempotency-Key: <unique-key>" \
  -H "Content-Type: application/json" \
  -d '{"name": "string"}'