Sandbox work and access
Get a command from the history
Get one command’s record: its text, mode, status, exit code and output size.
GET
/
sandboxes
/
{sandboxId}
/
command-history
/
{commandId}
Get one command from the history
curl --request GET \
--url https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}', 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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}",
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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}"
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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}")
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{
"ok": true,
"type": "command.info",
"command": {
"commandId": "cmd_k3v9x2mq7tbw",
"sandboxId": "<string>",
"command": "<string>",
"mode": "sync",
"status": "running",
"stdoutBytes": 123,
"stderrBytes": 123,
"outputTruncated": true,
"startedAt": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"processId": 123,
"exitCode": 123,
"signal": "<string>",
"finishedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 409,
"code": "provider_not_configured",
"message": "Prompting is locked until Codex is configured on the Agents page.",
"requestId": "req_01HX...",
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
}
}Authorizations
Boat bearer token in the form boat_.... Service API keys authenticate sandbox operations.
Path Parameters
Public Sandbox id returned by create/list/get sandbox calls.
Pattern:
^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$Response
The command.
Example:
true
Stable success envelope discriminator added by v1.
Allowed value:
"command.info"One command run through the commands endpoint (kept 90 days), or one process of the sandbox with mode process (kept 72 hours). Readable while the sandbox is stopped.
Show child attributes
Show child attributes
⌘I
Get one command from the history
curl --request GET \
--url https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}', 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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}",
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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}"
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://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/sandboxes/{sandboxId}/command-history/{commandId}")
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{
"ok": true,
"type": "command.info",
"command": {
"commandId": "cmd_k3v9x2mq7tbw",
"sandboxId": "<string>",
"command": "<string>",
"mode": "sync",
"status": "running",
"stdoutBytes": 123,
"stderrBytes": 123,
"outputTruncated": true,
"startedAt": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"processId": 123,
"exitCode": 123,
"signal": "<string>",
"finishedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 409,
"code": "provider_not_configured",
"message": "Prompting is locked until Codex is configured on the Agents page.",
"requestId": "req_01HX...",
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
}
}