A race and how each racer is doing
GET
/races/{race_id}
const url = 'https://api.global.stillbox.example/v1/races/race-7k2m9q4x8w3z5r6t';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.global.stillbox.example/v1/races/race-7k2m9q4x8w3z5r6t \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”race_id
required
string
Responses
Section titled “Responses”The race
Media typeapplication/json
object
id
required
string
sandbox_id
required
The sandbox that was copied.
string
task
required
string
check
string
dir
required
string
state
required
string
winner_id
The kept copy.
string
deadline
required
string format: date-time
created_at
required
string format: date-time
finished_at
string format: date-time
by
The person who started the race.
string
racers
required
Array<object>
object
n
required
The racer’s number, from 1.
integer
sandbox_id
required
string
sandbox_name
required
string
sandbox_deleted
boolean
state
required
Starting until its copy runs; working while its agent works; checking while the check runs.
string
response_id
The agent’s response in the copy; read it through /sandboxes/{id}/agent/v1/responses/{response_id}.
string
turn_status
How the agent’s turn ended (completed, failed or cancelled).
string
started_at
string format: date-time
finished_at
string format: date-time
duration_ms
How long the agent worked, once it reported its run.
integer format: int64
input_tokens
required
integer format: int64
output_tokens
required
integer format: int64
cost_usd
required
As the agent reported it.
number format: double
changes
required
Git’s summary of the files changed in dir, untracked files included; empty without changes or git.
string
check_exit_code
The check’s exit code; absent without a check.
integer
check_output
required
The last 4 KB of the check’s output.
string
error
string
Example
{ "state": "running", "racers": [ { "state": "starting" } ]}The API key is missing or invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}No such sandbox in your organization (or no such file)
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}