pxxl db create is identical to one created by clicking through the UI — it appears in the dashboard, can be linked to projects, and ships with the same connection credentials, backups, and metrics.
Use the Database API when you want to:
- Spin up a fresh database during a CI job, integration test, or per-tenant onboarding flow.
- Restart or stop a database from an internal incident-response script without giving the operator dashboard access.
- Pull stats, table lists, or sizes into your own monitoring dashboard.
- Tear down ephemeral databases created for preview environments.
Supported Engines
You can provision any of the following engines. Pass the value as the--type flag (CLI) or type field (SDK).
CLI
Install the CLI and log in once with a Pxxl API key. The CLI stores credentials locally with restricted file permissions.Provisioning
Create a new managed database. Pxxl returns the database ID, connection string, and credentials.Inspecting
Lifecycle
Lifecycle commands match the buttons in the dashboard. They are idempotent — starting an already-running database is a no-op.Node SDK
The same operations are available from the@pxxlapp/pxxl Node package. The SDK is designed for backend automation — never instantiate it from browser code.
API Keys and Permissions
Database operations require an API key withscope=database or scope=all. Always pick the smallest permission level that fits the job — read-only keys are safe to share with monitoring jobs and on-call dashboards, while read_write keys should be limited to deployment automation.
The Gateway re-checks spaceship membership on every request, so a stolen key cannot reach databases in spaceships the owning user does not belong to.
