Aller au contenu principal

Provisioning Databases

Create production-ready databases with a single API call or from the Dashboard.


Creating a Database

From the Dashboard

  1. Navigate to your Workspace.
  2. Click Create Database.
  3. Fill in the details:
FieldRequiredDescription
Display NameHuman-readable name (e.g., production-api)
EnginePostgreSQL, Redis, or MongoDB
DescriptionOptional description
  1. Click Create.

Via the API

curl -X POST https://api.lordbase.com/e/v1/developer/workspaces/{workspace_id}/databases/ \
-H "Authorization: Bearer lb_pat_your_token" \
-H "Content-Type: application/json" \
-d '{
"display_name": "my-app-db",
"engine": "postgres",
"description": "Main application database"
}'

What Gets Created

When you provision a database, Lordbase automatically:

  1. Creates the database instance on the provisioning server
  2. Generates a unique database name (e.g., lb_a1b2c3d4e5f6)
  3. Creates admin credentials (username + secure password)
  4. Configures connection pooling (PostgreSQL only, via PgBouncer)
  5. Sets default limits based on your plan

Database Limits

Each database has configurable limits based on your plan:

LimitDefaultDescription
Max Storage1 GBMaximum storage capacity
Max Connections20Maximum concurrent connections
astuce

Contact support or upgrade your plan to increase these limits.


Pausing & Resuming

Pause a Database

Pausing suspends the database, freeing resources while preserving data.

curl -X POST https://api.lordbase.com/e/v1/developer/databases/{database_id}/pause/ \
-H "Authorization: Bearer lb_pat_your_token"

Resume a Database

curl -X POST https://api.lordbase.com/e/v1/developer/databases/{database_id}/resume/ \
-H "Authorization: Bearer lb_pat_your_token"
attention

Paused databases do not accept connections. Ensure your application handles reconnection gracefully.


Cloning Databases

Clone an existing database to create an exact copy with new credentials.

curl -X POST https://api.lordbase.com/e/v1/developer/databases/{database_id}/clone/ \
-H "Authorization: Bearer lb_pat_your_token" \
-H "Content-Type: application/json" \
-d '{"new_display_name": "staging-clone"}'

Use cases:

  • Create staging environments from production data
  • Test migrations on a copy before applying to production
  • Create developer sandboxes

Deleting a Database

Irreversible Action

Deleting a database permanently removes all data, users, backups, and configuration. This cannot be undone.

curl -X DELETE https://api.lordbase.com/e/v1/developer/databases/{database_id}/ \
-H "Authorization: Bearer lb_pat_your_token"

Next Steps