Snapshots
Restore a snapshot
Restore a snapshot to a new virtual machine. Supply the snapshot ID in the path to restore the specified snapshot.
State requirement: This operation requires the snapshot to be in the COMPLETE state.
post/core/snapshots/{id}/restore
Request
- Base URL: https://infrahub-api.nexgencloud.com/v1
- URL: https://infrahub-api.nexgencloud.com/v1/core/snapshots/{id}/restore
- Auth: API key in header api_key
Path parameters
idinteger required
ID of the snapshot.
Request body
Response
Success
Example response
{
"status": true,
"message": "Getting VM detail successful",
"instance": {
"id": 1402,
"name": "example-vm",
"status": "CREATING",
"environment": {
"id": 9876,
"name": "example-environment",
"org_id": 7613,
"region": "NORWAY-1",
"features": {
"green_status": "GREEN"
}
},
"image": {
"name": "Ubuntu Server 24.04 LTS (Noble Numbat)"
},
"flavor": {
"id": 8429,
"name": "n1-cpu-small",
"cpu": 4,
"ram": 4,
"disk": 100
},
"os": "Ubuntu Server 24.04 LTS (Noble Numbat)",
"keypair": {
"name": "example-keypair"
},
"volume_attachments": [
{
"volume": {
"id": 1402,
"name": "example-volume",
"description": "example",
"volume_type": "Cloud-SSD",
"size": 10
},
"status": "ATTACHING",
"device": "/dev/disk/by-id/virtio-a66fd1a8-e198-4eb4-a",
"created_at": "2026-05-06T16:04:09Z"
}
],
"security_rules": [
{
"id": 1129,
"direction": "egress",
"protocol": "any",
"port_range_min": 1,
"port_range_max": 65535,
"ethertype": "IPv4",
"remote_ip_prefix": "0.0.0.0/0",
"status": "SUCCESS",
"created_at": "2026-05-06T15:18:42Z"
}
],
"power_state": "NOSTATE",
"vm_state": "building",
"fixed_ip": "192.0.2.91",
"floating_ip": "203.0.113.205",
"floating_ip_status": "NO FLOATING IP",
"port_randomization_status": "NO_FLOATING_IP",
"port_randomization": true,
"created_at": "2026-05-06T16:04:09Z"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.