Database
Returns the Dispack catalog of available engines (versions, ports, volumes), random name/password suggestions, and per-engine vars with required/optional env keys plus fromSuggestions (suggested* → env) so clients can build the POST /database body without hardcoding env names.
Presets loaded successfully
Authentication error
GET /v2/database/presets HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"databases": [
{
"type": "postgres",
"versions": [
"16",
"17"
],
"extensions": [
"pgvector"
],
"defaultPort": 5432,
"suggestedDisplayName": "Nova base Brisa",
"suggestedDbName": "brisa-aurora",
"suggestedUser": "brisa",
"suggestedPassword": "a1b2c3d4e5f6",
"vars": {
"required": [
"POSTGRES_DB",
"POSTGRES_USER",
"POSTGRES_PASSWORD"
],
"optional": [],
"fromSuggestions": {
"POSTGRES_DB": "suggestedDbName",
"POSTGRES_USER": "suggestedUser",
"POSTGRES_PASSWORD": "suggestedPassword"
}
}
}
]
}
}Regenerates suggestedDisplayName / suggestedDbName / suggestedUser without reloading the full presets catalog. Does not return a password.
Engine (postgres, mysql, mariadb, mongodb, redis, valkey, clickhouse)
Suggestions generated
Invalid type
Authentication error
GET /v2/database/presets/random-names HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"suggestedDisplayName": "Nova base Orion",
"suggestedDbName": "orion-nova",
"suggestedUser": "orion"
}
}Lists databases owned by the user plus databases linked to projects of teams the user belongs to. Secrets (vars / varsEncrypted) are omitted.
Databases listed successfully
Authentication error
GET /v2/database HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": [
{
"_id": "1714500000365db",
"userID": "123456789012345678",
"displayName": "My Postgres staging",
"projectID": null,
"db": {
"type": "postgres",
"version": "17",
"port": 5432
},
"clusterName": "BOLT",
"totalRam": 512,
"hostname": "pedro042",
"addedAtTimestamp": 1714500000000
}
]
}Starts asynchronous provisioning of a managed database. Returns HTTP 200 immediately with the new id. Poll GET /database/{dbID} until the resource exists and is online. Minimum plan Diamond (4). Optional projectID bills quota to the project owner and requires project admin access.
Friendly name (required)
RAM in MB (minimum 100)
Optional project to link
Creation started
Invalid body (missing fields, varsEncrypted on create, invalid vars)
Authentication error
Plan or RAM quota insufficient
Another process is already running for this resource
No cluster available or hostname exhausted
POST /v2/database HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 178
{
"displayName": "My Postgres staging",
"db": {
"type": "postgres",
"version": "17"
},
"vars": {
"POSTGRES_DB": "app_db",
"POSTGRES_USER": "app_rw",
"POSTGRES_PASSWORD": "secret"
},
"totalRam": 512
}{
"status": "ok",
"id": "1714500000365db",
"message": "The database is being created. Track progress by querying the resource."
}Returns live container status plus plaintext vars (decrypted). Same access model as the dashboard: owner or team member with access to the linked project.
Database ID
Database status loaded
Authentication error
No access to this database
Database not found
GET /v2/database/{dbID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Database status loaded.",
"database": {
"_id": "1714500000365db",
"projectID": null,
"clusterName": "BOLT",
"hostname": "pedro042",
"displayName": "My Postgres staging",
"dbType": "postgresql",
"dbEngine": "postgres",
"dbVersion": "17",
"extensions": [],
"totalRam": 512,
"owner": {
"id": "123456789012345678",
"username": "dev_user",
"avatar": null
},
"perms": null,
"vars": {
"POSTGRES_DB": "app_db",
"POSTGRES_USER": "app_rw",
"POSTGRES_PASSWORD": "***"
},
"online": true,
"exists": true,
"totalUsedRam": 187.3,
"last_restart": "2 minutes",
"dataVolumeSizeHuman": "1.2G"
}
}Permanently removes the database record and its infrastructure. Requires delete_app.
Database ID
Database deleted
Authentication error
No permission to delete
Database not found
Another process is already running
DELETE /v2/database/{dbID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Your application has been removed."
}Updates displayName, hostname and/or totalRam. Requires commit_app; changing totalRam also requires edit_ram. Hostname requires owner plan > 3. Changing hostname or RAM triggers an async infrastructure rebuild (rebuilding=true + opId); poll GET /database/{dbID}.
Database ID
Private hostname (1–2 segments a-z0-9_ joined by -, max 25)
Database updated (optionally rebuilding)
Invalid body or no fields to update
Authentication error
No permission or plan too low for hostname
Database not found
Hostname already taken
Another process is already running
PATCH /v2/database/{dbID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 44
{
"displayName": "Staging DB",
"totalRam": 1024
}{
"status": "ok",
"message": "Database updated successfully.",
"rebuilding": false,
"data": {
"_id": "1714500000365db",
"displayName": "Staging DB",
"totalRam": 1024,
"hostname": "pedro042"
}
}Starts the database container. Requires start_app. Subject to RAM/slot checks.
Database ID
Started (or already running with status error)
Authentication error or start failure
No permission or resource limit
Database not found
Another process is already running
PUT /v2/database/{dbID}/start HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Your application has been connected."
}Stops the database container. Requires stop_app.
Database ID
Stopped (or already stopped with status error)
Authentication error
No permission to stop
Database not found
Another process is already running
PUT /v2/database/{dbID}/stop HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Your application has been turned off."
}Restarts the database container. Requires restart_app.
Database ID
Restarted successfully
Authentication error or restart failure
No permission or resource limit
Database not found
Another process is already running
PUT /v2/database/{dbID}/restart HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Your application has been restarted."
}Creates a backup of the managed database (synchronous). Requires backup_app. Returns download metadata; S3 keys are stripped from the response.
Database ID
trueBackup created
Backup not supported or failed
Authentication error
No permission to backup
Database not found
Another process is already running
Database offline
POST /v2/database/{dbID}/backup HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"gzip": true
}{
"status": "ok",
"data": {
"backupId": 20240101120000,
"downloadUrl": "https://example.s3.amazonaws.com/..."
}
}Lists backups stored in S3 for this database. Requires status_app.
Database ID
Page size (1–1000, default 50). Alias maxKeys also accepted.
Continuation token from a previous response
minimal (default) or full
Backups listed
Authentication error
No permission
Database not found
GET /v2/database/{dbID}/backups HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"backups": [
{
"backupId": 20240101120000,
"createdAt": "2024-01-01T12:00:00.000Z",
"size": 1048576
}
],
"nextCursor": null
}
}Returns a presigned URL for the backup dump. Requires backup_app.
Database ID
Backup ID
URL validity in days (1–14)
Download URL generated
Invalid request
Authentication error
No permission
Database or backup not found
GET /v2/database/{dbID}/backups/{backupId}/download HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"data": {
"downloadUrl": "https://example.s3.amazonaws.com/...",
"expiresAt": "2024-01-08T12:00:00.000Z"
}
}Creates a new managed database from an existing backup (asynchronous). Requires backup_app on the source database. Minimum plan Diamond (4). Returns the new id immediately; poll GET /database/{id}.
Source database ID (backup owner)
Mutually exclusive with vars
Restore started
Invalid body
Authentication error
No permission or plan/quota insufficient
Source database or project not found
Another process is already running
POST /v2/database/{dbID}/restore HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"backupId": 20240101120000,
"totalRam": 512,
"displayName": "Restored Postgres"
}{
"status": "ok",
"id": "1714500000999db",
"message": "Restore from backup has started. Track progress by querying the resource."
}Returns recent container logs (same shape as app logs). Requires logs_app.
Database ID
Logs loaded
Authentication error
No permission to read logs
Database not found
GET /v2/database/{dbID}/logs HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Your application logs have been loaded",
"app": {
"_id": "1714500000365db",
"terminal": {
"big": "...",
"small": "...",
"url": null
}
}
}Purges stored logs for the database. Requires logs_app.
Database ID
Logs deleted
Authentication error
No permission to delete logs
Database not found
DELETE /v2/database/{dbID}/logs HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok"
}Last updated