Restore Computer snapshot
curl --request POST \
--url https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"resource_id": "<string>",
"retry": "no-retry",
"result": {
"id": "<string>",
"display_name": "<string>",
"ram_mib": 2147483648,
"state": "running"
}
}{
"ok": false,
"resource_id": "<string>",
"retry": "safe",
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {
"tool_id": "<string>",
"status": "success",
"reason": "verified",
"version": "<string>",
"launch": "<string>"
},
"retry_after_seconds": 2,
"limit": {
"dimension": "memory",
"scope": "account"
}
}
}{
"ok": false,
"resource_id": "<string>",
"retry": "safe",
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {
"tool_id": "<string>",
"status": "success",
"reason": "verified",
"version": "<string>",
"launch": "<string>"
},
"retry_after_seconds": 2,
"limit": {
"dimension": "memory",
"scope": "account"
}
}
}Snapshots & Storage
Restore Computer snapshot
Destructively replace the current disk state of this existing Computer with its owned disk snapshot. The Computer must already be Stopped. Success returns the same Computer ID in Running state and keeps current Account, API, SSH and Vault authorization. Only disk contents are restored. Legacy assets that cannot be included in current resource accounting cause RESOURCE_CONFLICT. A completed restore is no-retry because replay could discard later writes. After UNKNOWN query the original Computer.
POST
/
v1
/
computers
/
{computer_id}
/
snapshots
/
{snapshot_id}
/
restore
Restore Computer snapshot
curl --request POST \
--url https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.deepest.dev/v1/computers/{computer_id}/snapshots/{snapshot_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"resource_id": "<string>",
"retry": "no-retry",
"result": {
"id": "<string>",
"display_name": "<string>",
"ram_mib": 2147483648,
"state": "running"
}
}{
"ok": false,
"resource_id": "<string>",
"retry": "safe",
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {
"tool_id": "<string>",
"status": "success",
"reason": "verified",
"version": "<string>",
"launch": "<string>"
},
"retry_after_seconds": 2,
"limit": {
"dimension": "memory",
"scope": "account"
}
}
}{
"ok": false,
"resource_id": "<string>",
"retry": "safe",
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {
"tool_id": "<string>",
"status": "success",
"reason": "verified",
"version": "<string>",
"launch": "<string>"
},
"retry_after_seconds": 2,
"limit": {
"dimension": "memory",
"scope": "account"
}
}
}Authorizations
accountKeyclerkSession
Path Parameters
Response
A completed product action or observation.