GET /api/result/{id}#

Get the result of a run you sent earlier.

Request#

curl -s "https://api.rustbox.sh/api/result/550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: rb_live_your_key_here" | jq

Response#

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "schema_version": "2.0",
  "language": "python",
  "profile": "judge",
  "status": "completed",
  "timestamps": {
    "created_at": "2026-04-02T12:00:00.000Z",
    "started_at": "2026-04-02T12:00:00.001Z",
    "completed_at": "2026-04-02T12:00:00.053Z"
  },
  "result": {
    "verdict": "AC",
    "cause": "normal_exit",
    "actor": "runtime",
    "exit_code": 0,
    "signal": null,
    "error_message": null
  },
  "output": {
    "stdout": "hello world\n",
    "stderr": "",
    "integrity": "complete"
  },
  "metrics": {
    "cpu_time_secs": 0.015,
    "wall_time_secs": 0.018,
    "memory_peak_bytes": 8400000,
    "cpu_wall_ratio": 0.833,
    "divergence": "cpu_bound"
  },
  "evidence": {
    "isolation": {
      "mode": "strict",
      "controls_applied": ["pid_namespace", "mount_namespace", "network_namespace", "memory_limit", "process_limit", "no_new_privileges"],
      "controls_missing": [],
      "proc_policy": "hardened",
      "sys_policy": "builtin-deny",
      "pidfd_mode": "native",
      "reason": "All configured controls applied"
    },
    "limits": {
      "cgroup_backend": "cgroup_v2",
      "cgroup": {
        "memory_limit_bytes": 268435456,
        "memory_peak_bytes": 8400000,
        "oom_events": 0,
        "oom_kill_events": 0,
        "cpu_usage_usec": 15000,
        "process_count": 0,
        "process_limit": 10
      }
    },
    "teardown": {
      "reap_status": "clean",
      "descendant_containment": "ok",
      "zombie_count": 0,
      "cleanup_verified": true,
      "residual_mounts": [],
      "collection_errors": []
    }
  }
}

Response fields#

The response is grouped into timestamps, result, output, metrics and evidence. The fields that name the run stay at the top.

Top-level fields#

FieldTypePresentDescription
idstring (UUID)alwaysThe run's id
schema_versionstringalwaysVersion of this response format (currently "2.0")
languagestringalwaysLanguage the code ran in
profilestringalwaysProduct the run used (judge)
statusstringalwayspending, running, completed or error

timestamps object#

FieldTypePresentDescription
created_atstringalwaysWhen the run was sent (ISO 8601)
started_atstring or nullwhen startedWhen the code started running (ISO 8601)
completed_atstring or nullwhen completedWhen the code finished (ISO 8601)

result object#

FieldTypePresentDescription
verdictstring or nullwhen completedResult code: AC, RE, TLE, MLE, PLE, FSE, OLE, SIG, IE (see Result codes)
causestring or nullwhen completedWhy the run ended (for example normal_exit, oom_kill, wall_timeout)
actorstring or nullwhen completedWhat ended the run (runtime, kernel, judge)
exit_codeinteger or nullwhen completedThe code the program exited with
signalinteger or nullwhen completedThe signal that stopped the program, or null
error_messagestring or nullwhen completedWhat went wrong, in words, or null when nothing did

output object#

FieldTypePresentDescription
stdoutstring or nullwhen completedWhat the program printed
stderrstring or nullwhen completedWhat the program printed as errors
integritystring or nullwhen completedcomplete, truncated_by_judge_limit, crash_mid_write or write_error

output.integrity values#

ValueMeaning
completeEverything the program printed was saved
truncated_by_judge_limitThe output went over the size limit and was cut off
crash_mid_writeThe program stopped while it was printing
write_errorSomething went wrong while saving the output

metrics object#

FieldTypePresentDescription
cpu_time_secsnumber or nullwhen completedCPU time used, in seconds
wall_time_secsnumber or nullwhen completedTotal time from start to finish, in seconds
memory_peak_bytesinteger or nullwhen completedMost memory used at one time, in bytes
cpu_wall_rationumber or nullwhen completedCPU time divided by total time
divergencestring or nullwhen completedHow the time was spent: cpu_bound (computing), sleep_or_block_bound (waiting) or host_interference_suspected (the machine was busy)

evidence object#

Proof of how the run was protected, taken from what the kernel recorded, in three blocks. null while the run is still waiting.

BlockDescription
isolationWhich protections were on and which were missing, plus the process, system and tracking settings
limitsThe limits that applied and what the run used
teardownWhether every process was stopped and everything was cleaned up

evidence.isolation object#

FieldTypeDescription
modestringHow strict the protection was (strict)
controls_appliedstring[]Protections that were on during the run
controls_missingstring[]Protections that could not be turned on (normally empty)
proc_policystringHow much process information the code could see (hardened when the mount namespace is on)
sys_policystringWhich actions were blocked (seccomp): builtin-deny, custom or disabled
pidfd_modestringHow rustbox tracked the program (native or fallback)
reasonstringWhy this mode was used

evidence.limits object#

FieldTypeDescription
rlimitsobject or nullPer-process limits that applied (CPU, memory space, file size, open files, processes)
cgroup_backendstringWhich limits system was used (for example cgroup_v2)
cgroupobjectWhat the run used, as counted by the limits system (see below)

evidence.limits.cgroup object#

FieldTypeDescription
memory_limit_bytesintegerMemory limit for the run
memory_peak_bytesintegerMost memory the run used at one time
oom_eventsintegerTimes the run hit its memory limit
oom_kill_eventsintegerTimes a process was stopped for using too much memory
cpu_usage_usecintegerCPU time in microseconds
process_countintegerProcesses still running when the numbers were read
process_limitintegerMost processes the run was allowed to start

evidence.teardown object#

FieldTypeDescription
reap_statusstringWhether every process was stopped cleanly (clean)
descendant_containmentstringWhether every child process stayed inside the box (ok)
zombie_countintegerFinished processes left uncollected when the numbers were read
cleanup_verifiedbooleanTrue when rustbox removed every mount and folder it created
residual_mountsstring[]Mounts left behind after cleanup (normally empty)
collection_errorsstring[]Anything that went wrong while collecting the proof

Status lifecycle#

pending -> running -> completed
                   -> error
StatusMeaning
pendingIn the queue, waiting for a worker
runningRunning in a box
completedFinished (see result.verdict for what happened)
errorSomething failed on our side

Result codes#

CodeIn plain wordsWhat happened
ACRan fineExited cleanly with code 0
RECrashedExited with a non-zero code, or crashed
TLEToo slowRan past the time limit
MLEToo much memoryStopped by the kernel for using more memory than allowed
PLEToo many processesStarted more processes than allowed, for example by copying itself forever
FSEFile too bigWrote a file bigger than allowed (SIGXFSZ from RLIMIT_FSIZE)
OLEToo much outputPrinted more than 1 MB to stdout or stderr; the output is kept up to that point
SIGKilledStopped by a signal that rustbox did not send
IEFailed on our sideSomething broke in rustbox, not in your code

Every result comes from what the kernel recorded. MLE means the kernel's out-of-memory killer stopped the program. TLE means the time limit ran out. PLE means the process limit was hit. FSE means a write went over the file size limit. Rustbox never guesses a result from the exit code.

What happens when time runs out#

When a run goes past its time limit, rustbox stops the program at once (SIGKILL). The result is TLE.

Because the program is stopped mid-run, stdout may be incomplete. Check output.integrity: it says crash_mid_write or truncated_by_judge_limit if some output is missing.

result.cause is wall_timeout and result.actor is judge. The evidence.teardown.judge_actions list (only there when rustbox stepped in) records the stop. Example:

{
  "status": "completed",
  "result": {
    "verdict": "TLE",
    "cause": "wall_timeout",
    "actor": "judge"
  },
  "output": {
    "integrity": "crash_mid_write"
  },
  "metrics": {
    "wall_time_secs": 7.001
  },
  "evidence": {
    "teardown": {
      "judge_actions": [
        { "action_type": "forced_kill", "details": "SIGKILL sent to proxy group" }
      ]
    }
  }
}

Not found#

HTTP 404
{ "error": "submission not found" }