Batch Get Sandboxes
curl --request GET \
--url https://api.example.com/api/v1/sandboxes \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.example.com/api/v1/sandboxes"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.example.com/api/v1/sandboxes', 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.example.com/api/v1/sandboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/sandboxes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
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.example.com/api/v1/sandboxes")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/sandboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"created_by_user_id": "<string>",
"sandbox_spec_id": "<string>",
"status": "STARTING",
"session_api_key": "<string>",
"exposed_urls": [
{
"name": "<string>",
"url": "<string>",
"port": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"status_detail": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sandbox
Batch Get Sandboxes
Get a batch of sandboxes given their ids, returning null for any missing.
GET
/
api
/
v1
/
sandboxes
Batch Get Sandboxes
curl --request GET \
--url https://api.example.com/api/v1/sandboxes \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.example.com/api/v1/sandboxes"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.example.com/api/v1/sandboxes', 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.example.com/api/v1/sandboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/sandboxes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
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.example.com/api/v1/sandboxes")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/sandboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"created_by_user_id": "<string>",
"sandbox_spec_id": "<string>",
"status": "STARTING",
"session_api_key": "<string>",
"exposed_urls": [
{
"name": "<string>",
"url": "<string>",
"port": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"status_detail": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Response
(SandboxInfo · object | null)[]
Successful Response
Information about a sandbox.
Available options:
STARTING, RUNNING, PAUSED, ERROR, MISSING Key to access sandbox, to be added as an X-Session-API-Key header in each request. In cases where the sandbox statues is STARTING or PAUSED, or the current user does not have full access the session_api_key will be None.
URLs exposed by the sandbox (App server, Vscode, etc...)Sandboxes with a status STARTING / PAUSED / ERROR may not return urls.
Show child attributes
Show child attributes
Last pod/scheduling reason from the runtime (e.g. insufficient kvm, ImagePullBackOff), surfaced when a sandbox is stuck or errored.
Was this page helpful?

