Stop a queued or running test run of an agent
POSThttps://platform.docana.com/api/v1/agents/:agentId/test-runs/:runId/stop/
Runs with status QUEUED or RUNNING can be stopped; a queued run is cancelled before the worker ever claims it. Stopping aborts the agent executions of the run thread, then marks the run as ERROR with the reason Cancelled by user. The terminal write is a compare-and-set: if the run finishes first, the response is 409 and the completed result stands. The applicationId query parameter is optional: when omitted, it is derived from the run itself.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
The test run was cancelled
Invalid applicationId or run is already terminal
The API key or session is missing, expired, or malformed.
The caller is authenticated but not allowed to perform this operation.
Test run not found
The run reached a terminal state before it could be cancelled
Unexpected server error.