curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/snapshots/{snapshot_id}/restore/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/snapshots/{snapshot_id}/restore/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/snapshots/{snapshot_id}/restore/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Replaces the Virtual Machine’s disk with the snapshot. Everything written since the snapshot was taken is lost. The VM stops, gets a disk built from the snapshot, and starts again, so it is offline for a short time. Only a snapshot whose status is ready can be restored. Follow the restore with List VM Snapshot Restores.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Instance ID
Snapshot ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Responses
Section titled “Responses”Restore started. When the snapshot is gone from the cluster but a copy of it is in object storage, the restore starts from that copy instead: the message is Restore from object storage started and data holds only id, the restore’s ID.
object
object
The snapshot’s ID.
The ID of this restore in the restore list.
object
Example
{ "code": 200, "message": "VM restore started", "data": { "id": 212, "restore_id": 35 }, "errors": {}}The snapshot’s status is not ready.
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Snapshot is not ready to restore."}No snapshot with that ID on this VM.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Snapshot not found."}The snapshot is gone from the cluster and has no other copy.
object
object
Example
{ "code": 412, "message": "Precondition Failed", "data": {}, "errors": "This snapshot no longer exists on the cluster and has not been copied to object storage, so there is nothing left to restore from."}