Cancel Simulation Run
Changed onCancel an in-flight simulation run.
Cascades the cancel down to child sim_conversations:
- Set simulation_run.status = COMPLETED (the only terminal state after the SimulationRunStatus collapse). The fact that the user cancelled the run is captured by child sim_conversation rows transitioning to CANCELLED, not by a distinct sim_run status.
- For each child sim_conversation still in PRE_RUNNING_STATUSES, call mark_cancelled_async() — guarded so it raises if a status snuck out of pre-running between our read and write.
- Children that already started running (RUNNING / CONVERSATION_ENDED / EVALUATING) are LEFT ALONE — they keep their natural terminal status so dropped/completed calls still produce meaningful eval data.
- Bump simulation_run.tests_cancelled by the cascade count.
The endpoint is idempotent for already-terminal sim runs (returns success=False with a message; doesn't try to re-cancel).
post/v1/simulation-runs/{simulation_run_id}/cancel
Request
- Base URLhttps://api.getbluejay.ai
- URLhttps://api.getbluejay.ai/v1/simulation-runs/{simulation_run_id}/cancel
- AuthHTTPBearer (a scheme the document does not define)
Path parameters
simulation_run_idinteger required
Headers
X-Organization-Idstring
X-API-Keystring required
API key required to authenticate requests.
Response
Successful Response
Changes
- info
added the new optional
headerrequest parameterX-Organization-Id
- info