Roll back a VM snapshot
POST
/vm/{rid}/snapshots/{snapshotId}/rollback
const url = 'https://sylve.lan:8181/api/vm/1/snapshots/1/rollback';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/vm/1/snapshots/1/rollback \ --header 'Authorization: <Authorization>'Stop the VM if needed, roll every recorded VM ZFS root back to the selected snapshot while destroying newer ZFS snapshots, restore the saved configuration, and attempt to restore the prior running state
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”rid
required
integer
Virtual Machine RID
snapshotId
required
integer
VM Snapshot ID
Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
newerSnapshotsDestroyed
integer
restarted
boolean
warnings
Array<string>
wasRunning
boolean
error
string
message
string
status
string
Examplegenerated
{ "data": { "newerSnapshotsDestroyed": 1, "restarted": true, "warnings": [ "example" ], "wasRunning": true }, "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}