Keep one racer's copy and delete the others
const url = 'https://api.global.stillbox.example/v1/races/race-7k2m9q4x8w3z5r6t/keep';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sandbox_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.global.stillbox.example/v1/races/race-7k2m9q4x8w3z5r6t/keep \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sandbox_id": "example" }'The kept copy stays a normal sandbox, a duplicate of the race’s sandbox; racers still working are stopped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
The racer’s copy to keep.
Example generated
{ "sandbox_id": "example"}Responses
Section titled “Responses”The race, kept
object
The sandbox that was copied.
The kept copy.
The person who started the race.
object
The racer’s number, from 1.
Starting until its copy runs; working while its agent works; checking while the check runs.
The agent’s response in the copy; read it through /sandboxes/{id}/agent/v1/responses/{response_id}.
How the agent’s turn ended (completed, failed or cancelled).
How long the agent worked, once it reported its run.
As the agent reported it.
Git’s summary of the files changed in dir, untracked files included; empty without changes or git.
The check’s exit code; absent without a check.
The last 4 KB of the check’s output.
Example
{ "state": "running", "racers": [ { "state": "starting" } ]}The request is invalid
object
Example
{ "code": "not_found"}The API key is missing or invalid
object
Example
{ "code": "not_found"}No such sandbox in your organization (or no such file)
object
Example
{ "code": "not_found"}The change would leave the organization without an owner (last_owner), its seats are full (member_limit), or
the person is already a member (already_member)
object
Example
{ "code": "not_found"}