All endpoints are served by the FastAPI backend. The default base URL is http://localhost:8000.
ℹ
Note
Authentication is not enforced in the current build — all endpoints are open. The database is pre-seeded with a single user (id=1, email=admin@mclavier.tech) that is used for all runs.
| Status | Condition |
|---|---|
| 422 Unprocessable Entity | Git clone failed — bad URL or inaccessible repo |
| 422 Unprocessable Entity | manifest.json not found at repo root |
| 422 Unprocessable Entity | function.py not found at repo root |
Trigger a run
POST/apps/{app_id}/runCreate a job run and enqueue execution as a background task
| Value | Meaning |
|---|---|
| PENDING | Run created, not yet started |
| RUNNING | function.py is executing |
| SUCCESS | Execution completed, result is populated |
| FAILED | function.py raised an unhandled exception |
Error responses:
| Status | Condition |
|---|---|
| 404 Not Found | No run exists with the given run_id |
WebSocket
Subscribe to run status
WEBSOCKET/ws/runs/{run_id}Stream live status updates for a run
# Using websocat
websocat ws://localhost:8000/ws/runs/42
# Using wscat
wscat -c ws://localhost:8000/ws/runs/42
WebSocket lifecycle:
Client connects — server accepts immediately
Server polls the database every 3 seconds and sends a status message
When status is SUCCESS or FAILED, one final message is sent and the server closes the connection
If the run_id does not exist, a NOT_FOUND message is sent and the connection is closed
If the client disconnects early, the server catches WebSocketDisconnect and exits cleanly
ℹ
Note
The frontend connects to the WebSocket immediately after receiving the run_id from POST /apps/{id}/run. It processes each message to update the status indicator and, once a non-null result arrives, renders the output panel.