GET /api/result/{id}#

Retrieve execution result for a submission.

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. Identity fields stay at the top level.

Top-level fields#

FieldTypePresentDescription
idstring (UUID)alwaysSubmission identifier
schema_versionstringalwaysResponse schema version (currently "2.0")
languagestringalwaysLanguage used for execution
profilestringalwaysExecution profile (judge or agent)
statusstringalwayspending, running, completed, or error

timestamps object#

FieldTypePresentDescription
created_atstringalwaysISO 8601 timestamp when the submission was created
started_atstring or nullwhen startedISO 8601 timestamp when execution began
completed_atstring or nullwhen completedISO 8601 timestamp when execution finished

result object#

FieldTypePresentDescription
verdictstring or nullwhen completedVerdict code: AC, RE, TLE, MLE, PLE, FSE, SIG, IE
causestring or nullwhen completedWhy the run ended (e.g. normal_exit, oom_kill, wall_timeout)
actorstring or nullwhen completedWhat ended the run (runtime, kernel, judge)
exit_codeinteger or nullwhen completedProcess exit code
signalinteger or nullwhen completedSignal number that killed the process, or null
error_messagestring or nullwhen completedHuman-readable error description, or null on success

output object#

FieldTypePresentDescription
stdoutstring or nullwhen completedCaptured standard output
stderrstring or nullwhen completedCaptured standard error
integritystring or nullwhen completedcomplete, truncated_by_judge_limit, crash_mid_write, or write_error

output.integrity values#

ValueMeaning
completeAll output was captured without loss
truncated_by_judge_limitOutput exceeded the capture limit and was truncated
crash_mid_writeProcess crashed while writing output
write_errorAn I/O error occurred during output capture

metrics object#

FieldTypePresentDescription
cpu_time_secsnumber or nullwhen completedCPU time consumed in seconds
wall_time_secsnumber or nullwhen completedWall clock time in seconds
memory_peak_bytesinteger or nullwhen completedPeak resident memory in bytes
cpu_wall_rationumber or nullwhen completedCPU time divided by wall time
divergencestring or nullwhen completedPattern: cpu_bound, sleep_or_block_bound, or host_interference_suspected

evidence object#

Kernel-backed isolation evidence, organized into three blocks. null while the run is pending.

BlockDescription
isolationIsolation mode, applied vs missing controls, proc/sys (seccomp) policy, pidfd mode
limitsrlimits and cgroup accounting
teardownProcess reaping, descendant containment, and cleanup verification

evidence.isolation object#

FieldTypeDescription
modestringIsolation level applied (strict)
controls_appliedstring[]Security controls active during execution
controls_missingstring[]Controls that could not be applied (normally empty)
proc_policystringProcess policy (hardened when the mount namespace is on)
sys_policystringSyscall (seccomp) policy: builtin-deny, custom, or disabled
pidfd_modestringProcess tracking mode (native or fallback)
reasonstringWhy this isolation mode was chosen

evidence.limits object#

FieldTypeDescription
rlimitsobject or nullPOSIX rlimits applied (cpu, address space, file size, fds, procs)
cgroup_backendstringCgroup backend selected (e.g. cgroup_v2)
cgroupobjectCgroup accounting data (see below)

evidence.limits.cgroup object#

FieldTypeDescription
memory_limit_bytesintegerMemory limit applied to the cgroup
memory_peak_bytesintegerPeak memory usage recorded by the cgroup
oom_eventsintegerNumber of OOM events
oom_kill_eventsintegerNumber of OOM kill events
cpu_usage_usecintegerCPU time in microseconds
process_countintegerNumber of processes at collection time
process_limitintegerPID limit applied to the cgroup

evidence.teardown object#

FieldTypeDescription
reap_statusstringWhether all processes were cleanly reaped (clean)
descendant_containmentstringWhether all child processes were contained (ok)
zombie_countintegerNumber of zombie processes at collection time
cleanup_verifiedbooleanTrue when teardown removed every mount and dir it owned
residual_mountsstring[]Mounts left behind after teardown (normally empty)
collection_errorsstring[]Errors encountered while collecting evidence

Status lifecycle#

pending -> running -> completed
                   -> error
StatusMeaning
pendingQueued, waiting for a worker
runningExecuting in a sandbox
completedFinished (check result.verdict for the outcome)
errorInternal failure

Verdicts#

CodeNameWhat happened
ACAcceptedClean exit, code 0
RERuntime ErrorNon-zero exit or crash
TLETime Limit ExceededWall time exceeded
MLEMemory Limit ExceededOOM killed by cgroup
PLEProcess Limit ExceededFork/thread bomb hit cgroup PID limit
FSEFile Size ExceededSIGXFSZ from RLIMIT_FSIZE
SIGSignaledKilled by signal (not attributed to platform)
IEInternal ErrorPlatform infrastructure failed

Every verdict is backed by kernel evidence. MLE means the cgroup OOM killer fired. TLE means the wall timer expired. PLE means the cgroup PID limit was reached. FSE means a write exceeded the file size rlimit. The platform does not guess verdicts from exit codes.

What happens on timeout#

When a submission exceeds its wall time limit, the supervisor sends SIGKILL to the process. The resulting verdict is TLE.

Because the process is forcibly killed, stdout may be incomplete. Check output.integrity - it will indicate crash_mid_write or truncated_by_judge_limit if output was not fully captured.

result.cause will be wall_timeout and result.actor will be judge. The evidence.teardown.judge_actions array (present only when the supervisor intervened) carries the kill event. 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" }