PATCH/databases/{uuid}/storages

Update Storage

Update a persistent storage or file storage by database UUID.

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

1 parameter · 7 body fields
uuidstringrequired
UUID of the database.

Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.

contentstringoptional
The file content (file only, not allowed for read-only storages). Changing the content of a file outside the resource directory needs the deploy permission.
idintegeroptional
The ID of the storage (deprecated, use uuid instead).
is_preview_suffix_enabledbooleanoptional
Whether to add -pr-N suffix for preview deployments.
mount_pathstringoptional
The container mount path (not allowed for read-only storages).
namestringoptional
The volume name (persistent only, not allowed for read-only storages).
typestringrequired
The type of storage: persistent or file.
Allowed:persistentfile
uuidstringoptional
The UUID of the storage (preferred).

6 status codes
200Storage updated.
400Invalid token.
messagestringoptional
401Unauthenticated.
messagestringoptional
403The token needs the deploy permission to change the content of a file outside the resource directory.
404Resource not found.
messagestringoptional
422Validation error.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned: Invalid token. A 401 is returned: Unauthenticated. A 403 is returned: The token needs the deploy permission to change the content of a file outside the resource directory. A 404 is returned: Resource not found. A 422 is returned: Validation error.