Skip to content

Update a database

PATCH
/api/databases/{id}
curl --request PATCH \
--url https://example.com/api/databases/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "type": "example", "databaseTypeId": "example", "host": "example", "port": 1, "databaseName": "example", "username": "example", "password": "example", "filePath": "example", "useSsl": true, "serverId": "example", "backupStorageType": "local", "backupLocalPath": "example", "backupSpacesBucket": "example", "backupSpacesPrefix": "example", "backupFormat": "plain", "backupCompression": "none", "backupCompressionLevel": 1, "pgDumpOptions": { "noOwner": true, "clean": true, "ifExists": true, "schemaOnly": true, "dataOnly": true }, "pgDumpTimeoutMs": 1 }'
id
required
string
Media typeapplication/json
object
name
string
>= 1 characters
type
string
>= 1 characters
databaseTypeId
string
host
string
port
number
databaseName
string
username
string
password
string
filePath
string
useSsl
boolean
serverId
string
backupStorageType
string
Allowed values: local spaces
backupLocalPath
string
backupSpacesBucket
string
backupSpacesPrefix
string
backupFormat
string
Allowed values: plain custom tar
backupCompression
string
Allowed values: none gzip
backupCompressionLevel
number
>= 1 <= 9
pgDumpOptions
object
noOwner
boolean
clean
boolean
ifExists
boolean
schemaOnly
boolean
dataOnly
boolean
pgDumpTimeoutMs
number
>= 30000 <= 3600000

Bad request — malformed input or failed validation.

Media typeapplication/json
object
code

Stable, machine-readable error code. Always present on the wire.

string
Allowed values: VALIDATION_ERROR READONLY_FIELD UNAUTHORIZED FORBIDDEN_SCOPE FORBIDDEN_ROLE NOT_FOUND CONFLICT IDEMPOTENCY_KEY_REUSED RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL
message

Human-readable error message. Always present on the wire.

string
field

Field name when the error is tied to a specific input (e.g. validation).

string
hint

Optional, human-friendly hint for resolving the error.

string
requestId

Server-assigned request ID; quote this when reporting issues.

string
key
additional properties
any
Example
{
"code": "READONLY_FIELD",
"message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.",
"field": "exposedPorts",
"hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.",
"requestId": "req_01H0…"
}

Unauthorized — missing or invalid bearer token.

Media typeapplication/json
object
code

Stable, machine-readable error code. Always present on the wire.

string
Allowed values: VALIDATION_ERROR READONLY_FIELD UNAUTHORIZED FORBIDDEN_SCOPE FORBIDDEN_ROLE NOT_FOUND CONFLICT IDEMPOTENCY_KEY_REUSED RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL
message

Human-readable error message. Always present on the wire.

string
field

Field name when the error is tied to a specific input (e.g. validation).

string
hint

Optional, human-friendly hint for resolving the error.

string
requestId

Server-assigned request ID; quote this when reporting issues.

string
key
additional properties
any
Example
{
"code": "READONLY_FIELD",
"message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.",
"field": "exposedPorts",
"hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.",
"requestId": "req_01H0…"
}

Forbidden — token scope or role does not permit this operation.

Media typeapplication/json
object
code

Stable, machine-readable error code. Always present on the wire.

string
Allowed values: VALIDATION_ERROR READONLY_FIELD UNAUTHORIZED FORBIDDEN_SCOPE FORBIDDEN_ROLE NOT_FOUND CONFLICT IDEMPOTENCY_KEY_REUSED RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL
message

Human-readable error message. Always present on the wire.

string
field

Field name when the error is tied to a specific input (e.g. validation).

string
hint

Optional, human-friendly hint for resolving the error.

string
requestId

Server-assigned request ID; quote this when reporting issues.

string
key
additional properties
any
Example
{
"code": "READONLY_FIELD",
"message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.",
"field": "exposedPorts",
"hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.",
"requestId": "req_01H0…"
}

Not found.

Media typeapplication/json
object
code

Stable, machine-readable error code. Always present on the wire.

string
Allowed values: VALIDATION_ERROR READONLY_FIELD UNAUTHORIZED FORBIDDEN_SCOPE FORBIDDEN_ROLE NOT_FOUND CONFLICT IDEMPOTENCY_KEY_REUSED RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL
message

Human-readable error message. Always present on the wire.

string
field

Field name when the error is tied to a specific input (e.g. validation).

string
hint

Optional, human-friendly hint for resolving the error.

string
requestId

Server-assigned request ID; quote this when reporting issues.

string
key
additional properties
any
Example
{
"code": "READONLY_FIELD",
"message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.",
"field": "exposedPorts",
"hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.",
"requestId": "req_01H0…"
}

Unprocessable — e.g. a read-only field was supplied.

Media typeapplication/json
object
code

Stable, machine-readable error code. Always present on the wire.

string
Allowed values: VALIDATION_ERROR READONLY_FIELD UNAUTHORIZED FORBIDDEN_SCOPE FORBIDDEN_ROLE NOT_FOUND CONFLICT IDEMPOTENCY_KEY_REUSED RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL
message

Human-readable error message. Always present on the wire.

string
field

Field name when the error is tied to a specific input (e.g. validation).

string
hint

Optional, human-friendly hint for resolving the error.

string
requestId

Server-assigned request ID; quote this when reporting issues.

string
key
additional properties
any
Example
{
"code": "READONLY_FIELD",
"message": "Field \"exposedPorts\" is read-only and cannot be set via PATCH.",
"field": "exposedPorts",
"hint": "Exposed ports are discovered from the running container. Change the ports mapping in the compose file at composePath and redeploy.",
"requestId": "req_01H0…"
}