Skip to main content
Use this endpoint to restore a managed database to a prior state captured in a snapshot. You must provide both the snapshotId (the database ID that the snapshot belongs to) and the versionId (the specific version of the snapshot to restore). Retrieve both values from the List Snapshots endpoint.

Request

POST https://api.virtuscloud.app/v2/databases/{databaseId}/snapshots/restore

Headers

Authorization
string
required
Your Virtus Cloud API key. Pass it directly as the header value — no prefix required.Example: Authorization: vc_live_xxxxxxxxxxxx

Path Parameters

databaseId
string
required
The unique identifier of the database you want to restore into. This is typically the same database that the snapshot belongs to.

Body

snapshotId
string
required
The database ID that owns the snapshot you want to restore. Found in the name field of the List Snapshots response.
versionId
string
required
The specific snapshot version to restore. Extract this value from the versionId parameter within the key field returned by the List Snapshots endpoint (e.g., 45ec0b49-9af6-445e-a55c-abd7ec5278b2).

Response

status
string
Returns "success" when the restore operation is initiated successfully.
Restoring overwrites your current data. All data written after the selected snapshot was taken will be permanently lost. Take a fresh snapshot before restoring if you want to preserve the current state.

Examples

curl -X POST https://api.virtuscloud.app/v2/databases/a14b8d5e1cb7405a851eb4c075506121/snapshots/restore \
  -H "Authorization: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "snapshotId": "a14b8d5e1cb7405a851eb4c075506121",
    "versionId": "45ec0b49-9af6-445e-a55c-abd7ec5278b2"
  }'

Response Example

{
  "status": "success"
}