Roll back to a snapshot
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/snapshots/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "rollback"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'rollback'})
};
fetch('https://my.server.express/api/v1/cloud/{id}/snapshots/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/snapshots/{name}"
payload = { "action": "rollback" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"taskId": "<string>",
"name": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"taskId": "<string>",
"limit": 123,
"used": 123
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Cloud
Roll back to a snapshot
Destructive: throws away everything written since the snapshot. Runs as a background task — a running VM is stopped,
the disk rolled back, and the VM started again — and returns 202 with the task id. The body must say
{ "action": "rollback" }. Needs the operate role and an ACTIVE or CANCELLED service. 404 if the snapshot doesn’t exist;
409 if a task is already running. Writes a CLOUD_SNAPSHOT_ROLLBACK audit entry once done.
POST
/
v1
/
cloud
/
{id}
/
snapshots
/
{name}
Roll back to a snapshot
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/snapshots/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "rollback"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'rollback'})
};
fetch('https://my.server.express/api/v1/cloud/{id}/snapshots/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/snapshots/{name}"
payload = { "action": "rollback" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"taskId": "<string>",
"name": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"taskId": "<string>",
"limit": 123,
"used": 123
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
bearerAuthapiToken
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Service id of the cloud server.
Snapshot name.
Pattern:
^[a-zA-Z][a-zA-Z0-9_-]{0,39}$Body
application/json
Allowed value:
"rollback"