Cancels a pending or running job and returns its resulting state. Idempotent: cancelling a job that has already finished (or was already cancelled) is a no-op that returns the current state unchanged.
POST /jobs/{job_id}/cancel
There is no separate cancelled status. A cancelled job lands in status: "failed" with error.code: "cancelled" — so a poller that watches for terminal states needs no special case.
Cancellation can race with completion: if the job succeeds in the instant the
cancel arrives, the response reflects the real outcome (succeeded, result
intact) rather than pretending it was cancelled.
Request
The job to cancel. Another tenant’s job returns 404.
Response
The same job object as GET /jobs/{job_id}.
Example
curl -s -X POST "$NDI_BASE/jobs/b1e6d5c4-2a3f-4e89-a0b1-c2d3e4f5a6b7/cancel" \
-H "X-API-Key: $NDI_API_KEY"
{
"job_id": "b1e6d5c4-2a3f-4e89-a0b1-c2d3e4f5a6b7",
"action": "ground",
"status": "failed",
"result": null,
"error": { "code": "cancelled", "message": "cancelled by client request" },
"created_at": "2026-07-12T21:15:40Z",
"started_at": "2026-07-12T21:15:41Z",
"completed_at": "2026-07-12T21:16:02Z"
}