Snapshots
Get a snapshot operation
GET
/
v1
/
orgs
/
{slug}
/
snapshot-operations
/
{operation_id}
Get a snapshot operation
curl --request GET \
--url https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}', 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://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "disk",
"status": "queued",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
},
"result": {
"created_at": "2023-11-07T05:31:56Z",
"digest": "<string>",
"labels": {},
"location": {
"id": "<string>",
"type": "managed"
},
"manifest": {
"artifact": "<string>",
"created_at": "<string>",
"extensions": {},
"image": {
"manifest_digest": "<string>",
"ref": "<string>"
},
"labels": {},
"requires": [
"<string>"
],
"schema": 1,
"scope": "disk",
"state": {
"format": "raw",
"fstype": "<string>",
"upper": {
"file": "<string>",
"size_bytes": 1,
"integrity": {
"algorithm": "sha256",
"digest": "<string>"
}
},
"kind": "file"
},
"parent": "<string>",
"source_sandbox": "<string>"
},
"name": "<string>",
"size_bytes": 1,
"kind": "disk",
"sandbox_id": "<string>"
}
}Authorizations
Personal access token (msb_pat_…) or session JWT - the credential an agent acts with on a user's behalf.
Path Parameters
Organization slug
Snapshot operation id
Response
Snapshot operation
Wire shape of the asynchronous snapshot operation returned by snapshot capture endpoints.
Creation timestamp.
Server-side operation identifier.
Kind of snapshot being captured.
Available options:
disk Current operation status.
Available options:
queued, in_progress, succeeded, failed Timestamp of the most recent status change.
Timestamp of the terminal status, when the operation has finished.
Error details for a failed operation.
Show child attributes
Show child attributes
The resulting snapshot, present once the operation succeeds.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get a snapshot operation
curl --request GET \
--url https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}', 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://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.microsandbox.dev/v1/orgs/{slug}/snapshot-operations/{operation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "disk",
"status": "queued",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
},
"result": {
"created_at": "2023-11-07T05:31:56Z",
"digest": "<string>",
"labels": {},
"location": {
"id": "<string>",
"type": "managed"
},
"manifest": {
"artifact": "<string>",
"created_at": "<string>",
"extensions": {},
"image": {
"manifest_digest": "<string>",
"ref": "<string>"
},
"labels": {},
"requires": [
"<string>"
],
"schema": 1,
"scope": "disk",
"state": {
"format": "raw",
"fstype": "<string>",
"upper": {
"file": "<string>",
"size_bytes": 1,
"integrity": {
"algorithm": "sha256",
"digest": "<string>"
}
},
"kind": "file"
},
"parent": "<string>",
"source_sandbox": "<string>"
},
"name": "<string>",
"size_bytes": 1,
"kind": "disk",
"sandbox_id": "<string>"
}
}