PATCH/services/{uuid}/databases/{database_uuid}

Update a service database

Updates mutable fields on a compose service database. Supply only the fields you want to change; changing is_public starts or stops the database proxy and requires a token with deploy permission.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 8 body fields
uuidstringrequired
The UUID of the service that contains the database.
database_uuidstringrequired
The UUID of the compose service database to update.

Mutable fields for the compose service database. All fields are optional; include only the values you want to change.

descriptionstringoptional
A description of the service database.
exclude_from_statusbooleanoptional
Whether to exclude the database from status reporting.
human_namestringoptional
A human-readable name for the service database.
imagestringoptional
The container image to use for the database.
is_log_drain_enabledbooleanoptional
Whether log draining is enabled for the database.
is_publicbooleanoptional
Changing it starts or stops the database proxy, so it needs a token with the deploy permission.
public_portintegeroptional
The public port for the database. Must be between 1 and 65535 when provided.
public_port_timeoutintegeroptional
The timeout for the public port, in seconds. Must be at least 1 when provided.

6 status codes
200Returns the updated service database object.
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when the token lacks deploy permission to change `is_public`.
404Returned when the service or service database does not exist.
messagestringoptional
422Returned when a field value fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned for an invalid token, and a 401 when authentication is missing. A 403 is returned when changing is_public without deploy permission; a 404 is returned when the uuid path parameter or database_uuid path parameter does not identify a resource; a 422 is returned for validation errors. public_port must be between 1 and 65535, and public_port_timeout must be at least 1.