Skip to content

API Overview

The judge-service exposes a REST API for submitting code, polling results, and receiving webhook notifications.

http://localhost:3000/api

If RUSTBOX_API_KEY is set, every request must include it:

x-api-key: your-secret-key

Constant-time comparison is used. Missing or wrong keys return 401.

MethodPathWhat it does
POST/api/submitSubmit code for execution
GET/api/result/{id}Poll execution result
GET/api/languagesList supported languages
GET/api/healthService health + queue depth

Async (default): Submit, get back an ID, poll /api/result/{id} until it’s done.

Sync: Add ?wait=true to the submit request. The server holds the connection open and returns the result directly when execution completes (or times out after 30s).

Webhooks: Include webhook_url and webhook_secret in your submission. We’ll POST the result to your URL with an HMAC-SHA256 signature when it’s ready. Fire and forget.