POST/databases/{uuid}/clone

Clone a database

Creates a clone of a database at a destination owned by the authenticated team. Provide destination_uuid to select the destination, and set clone_volumes to true to include volume data when the token has deploy ability. The 201 response confirms that the database was cloned.

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

1 parameter · 3 body fields
uuidstringrequired
The UUID of the database to clone.

Clone configuration for the database. Provide destination_uuid; volume data is not cloned unless clone_volumes is true.

clone_volumesbooleanoptional
Whether to clone volume data. Needs the deploy ability.
Default:false
destination_uuidstringrequired
The UUID of the destination, which must be owned by the authenticated team.
namestringoptional
Optional name for the cloned database; may be a string or null.

6 status codes
201Returns confirmation that the database was cloned.
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when the token lacks deploy ability to clone volume data.
404Returned when a required resource is not found.
messagestringoptional
422Returned when the request fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned for an invalid token, and a 401 is returned when the request is unauthenticated. A 403 is returned when clone_volumes is true and the token lacks deploy ability; a 404 indicates that a resource was not found. destination_uuid is required and must identify a destination owned by the authenticated team. The uuid path parameter must identify the source database.