Sandboxes
Get a sandbox
GET
/
v1
/
sandboxes
/
{sandbox_id}
Get a sandbox
curl --request GET \
--url https://api.microsandbox.dev/v1/sandboxes/{sandbox_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.microsandbox.dev/v1/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.microsandbox.dev/v1/sandboxes/{sandbox_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",
"ephemeral": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"last_failure_message": "<string>",
"spec": {
"env": [
{
"key": "<string>",
"value": "<string>"
}
],
"labels": {},
"lifecycle": {
"ephemeral": true,
"idle_timeout_secs": 1,
"max_duration_secs": 1
},
"mounts": [
{
"guest": "<string>",
"options": {
"nodev": false,
"noexec": false,
"nosuid": false,
"readonly": false
},
"type": "Bind",
"quota_mib": 1
}
],
"network": {
"enabled": true,
"ports": [
{
"guest_port": 1,
"host_bind": "<string>",
"host_port": 1
}
],
"trust_host_cas": true,
"dns": {
"nameservers": [],
"query_timeout_ms": 5000,
"rebind_protection": true
},
"interface": {
"ipv4_address": null,
"ipv4_pool": null,
"ipv6_address": null,
"ipv6_pool": null,
"mac": null,
"mtu": null
},
"max_connections": 1,
"policy": {
"rules": [
{
"destination": "any",
"ports": [
{
"end": 1,
"start": 1
}
],
"protocols": []
}
]
},
"secrets": [
{
"allowed_hosts": [
{}
],
"env_var": "<string>",
"injection": {},
"placeholder": "<string>",
"on_violation": {}
}
],
"tls": {
"block_quic_on_intercept": true,
"bypass": [
"<string>"
],
"cache": {
"capacity": 1,
"validity_hours": 1
},
"enabled": true,
"intercept_ca": {
"cert_path": "<string>",
"key_path": "<string>"
},
"intercepted_ports": [
1
],
"scoped_upstream_ca_cert": [
{
"path": "<string>",
"pattern": "<string>"
}
],
"scoped_verify_upstream": [
{
"pattern": "<string>",
"verify": true
}
],
"upstream_ca_cert": [
"<string>"
],
"verify_upstream": true
}
},
"resources": {
"disk_size_mib": null,
"memory_mib": 512,
"vcpus": 1
},
"rlimits": [
{
"hard": 1,
"soft": 1
}
],
"runtime": {
"cmd": null,
"disable_metrics_sample": false,
"entrypoint": null,
"hostname": null,
"metrics_sample_interval_ms": 1000,
"scripts": {},
"shell": null,
"user": null,
"workdir": null
},
"image": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "unauthorized",
"details": null
}
}{
"error": {
"code": "sandbox_not_found",
"message": "resource not found",
"details": null
}
}Authorizations
Organization API key (msb_…) - org-scoped programmatic access.
Path Parameters
Sandbox ID
Response
Sandbox details
The API view of a [Sandbox]: an explicit allowlist of user-facing fields.
Internal columns (registry selection, sync bookkeeping, resolved refs) never
appear; the resolved spec surfaces only as the curated [SandboxSpecResponse].
Sandbox lifecycle status.
Available options:
created, starting, running, stopping, stopped, failed Human-readable reason for the last failure.
Curated projection of the resolved spec; absent until resolved.
Show child attributes
Show child attributes
Latest run's start time; null if the sandbox has never run.
Scheduler condition while status is starting.
Available options:
scheduling, insufficient_capacity Latest run's stop time; null while open or never run.
Was this page helpful?
⌘I
Get a sandbox
curl --request GET \
--url https://api.microsandbox.dev/v1/sandboxes/{sandbox_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.microsandbox.dev/v1/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_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/sandboxes/{sandbox_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.microsandbox.dev/v1/sandboxes/{sandbox_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",
"ephemeral": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"last_failure_message": "<string>",
"spec": {
"env": [
{
"key": "<string>",
"value": "<string>"
}
],
"labels": {},
"lifecycle": {
"ephemeral": true,
"idle_timeout_secs": 1,
"max_duration_secs": 1
},
"mounts": [
{
"guest": "<string>",
"options": {
"nodev": false,
"noexec": false,
"nosuid": false,
"readonly": false
},
"type": "Bind",
"quota_mib": 1
}
],
"network": {
"enabled": true,
"ports": [
{
"guest_port": 1,
"host_bind": "<string>",
"host_port": 1
}
],
"trust_host_cas": true,
"dns": {
"nameservers": [],
"query_timeout_ms": 5000,
"rebind_protection": true
},
"interface": {
"ipv4_address": null,
"ipv4_pool": null,
"ipv6_address": null,
"ipv6_pool": null,
"mac": null,
"mtu": null
},
"max_connections": 1,
"policy": {
"rules": [
{
"destination": "any",
"ports": [
{
"end": 1,
"start": 1
}
],
"protocols": []
}
]
},
"secrets": [
{
"allowed_hosts": [
{}
],
"env_var": "<string>",
"injection": {},
"placeholder": "<string>",
"on_violation": {}
}
],
"tls": {
"block_quic_on_intercept": true,
"bypass": [
"<string>"
],
"cache": {
"capacity": 1,
"validity_hours": 1
},
"enabled": true,
"intercept_ca": {
"cert_path": "<string>",
"key_path": "<string>"
},
"intercepted_ports": [
1
],
"scoped_upstream_ca_cert": [
{
"path": "<string>",
"pattern": "<string>"
}
],
"scoped_verify_upstream": [
{
"pattern": "<string>",
"verify": true
}
],
"upstream_ca_cert": [
"<string>"
],
"verify_upstream": true
}
},
"resources": {
"disk_size_mib": null,
"memory_mib": 512,
"vcpus": 1
},
"rlimits": [
{
"hard": 1,
"soft": 1
}
],
"runtime": {
"cmd": null,
"disable_metrics_sample": false,
"entrypoint": null,
"hostname": null,
"metrics_sample_interval_ms": 1000,
"scripts": {},
"shell": null,
"user": null,
"workdir": null
},
"image": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "unauthorized",
"details": null
}
}{
"error": {
"code": "sandbox_not_found",
"message": "resource not found",
"details": null
}
}