Look up the status of a batch of sandboxes
Reports the current status of each sandbox id in the batch, including ids whose sandbox was deleted. Every other read answers a deleted sandbox and one that never existed identically, so this is the way a caller holding stale references tells them apart. Ids the team does not own are returned as unknown, the same answer an id that never existed gets.
curl --request POST \
--url https://api.superserve.ai/sandboxes/lookup \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sandbox_ids": [
"<string>"
]
}
'import requests
url = "https://api.superserve.ai/sandboxes/lookup"
payload = { "sandbox_ids": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sandbox_ids: ['<string>']})
};
fetch('https://api.superserve.ai/sandboxes/lookup', 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.superserve.ai/sandboxes/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sandbox_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superserve.ai/sandboxes/lookup"
payload := strings.NewReader("{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superserve.ai/sandboxes/lookup")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superserve.ai/sandboxes/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"sandboxes": [
{
"id": "<string>",
"status": "starting"
}
],
"unknown": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}Body
Sandbox ids to look up, in either public form. Duplicates are collapsed. Page through a larger backlog a batch at a time.
1 - 1000 elementsPublic sandbox ID: a bare UUID, or the region-tagged form sb-<region>-<uuid> (e.g. sb-use-1b4e28ba-…). Treat as an opaque string; the tagged form routes the request to the sandbox's home region. Endpoints accept both forms interchangeably.
^(sb-[a-z0-9]+-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Response
Status for every id the team owns, and the rest as unknown.
Ids with no sandbox for this team: never created, or belonging to another team. Echoed exactly as submitted.
Public sandbox ID: a bare UUID, or the region-tagged form sb-<region>-<uuid> (e.g. sb-use-1b4e28ba-…). Treat as an opaque string; the tagged form routes the request to the sandbox's home region. Endpoints accept both forms interchangeably.
^(sb-[a-z0-9]+-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$curl --request POST \
--url https://api.superserve.ai/sandboxes/lookup \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sandbox_ids": [
"<string>"
]
}
'import requests
url = "https://api.superserve.ai/sandboxes/lookup"
payload = { "sandbox_ids": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sandbox_ids: ['<string>']})
};
fetch('https://api.superserve.ai/sandboxes/lookup', 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.superserve.ai/sandboxes/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sandbox_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superserve.ai/sandboxes/lookup"
payload := strings.NewReader("{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superserve.ai/sandboxes/lookup")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superserve.ai/sandboxes/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sandbox_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"sandboxes": [
{
"id": "<string>",
"status": "starting"
}
],
"unknown": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"action_url": "https://console.superserve.ai/plan-usage"
}
}