Job Status

Cancel a running job, and, for a .zip or .pst import, every document it has not sent for processing. A plain def so FastAPI runs it in its threadpool: an import's cancel can write tens of thousands of rows.

post/api/v0/job-statuses/{job_status_id}/cancel

Request

Path parameters

job_status_idstring uuid required

Response

Successful Response

idstring uuid required

The ID of the job status.

statusstring required

The status of the job. Options: queued, processing, done, error, cancelled.

error_messagestring nullable required

The error message returned from the job, if any.

created_atstring date-time required

The date and time the job status was created.

worker_activeboolean nullable

Whether a worker is currently executing a per-page task for this job. None when the job has no per-page dispatch (e.g. single-task jobs) or has reached a terminal state. Tells 'queued behind another job' from 'actively being processed' when status='processing', which the orchestrator sets before fan-out.

tasks_completedinteger nullable

Number of per-page tasks that have reported completion for this job. None when the job has no per-page dispatch (e.g. single-task jobs) or has reached a terminal state. Pair with tasks_total to render fraction progress (e.g. '3 / 11 pages').

tasks_totalinteger nullable

Total number of per-page tasks this job dispatched. None when the job has no per-page dispatch or has reached a terminal state.

waiting_forstring nullable

What a processing job is waiting for before it can go on, while it waits; null otherwise. sandbox: an agent run waiting for another agent run to finish, so that its sandbox can start.

document_idstring uuid nullable

The public ID of the document this job processes, while that document exists and the caller can read it; null for a job on no document and once the document is gone. A failed first processing of an upload removes the document it was creating, so an error or cancelled job of a document whose document_id is null left nothing to open; a failed reprocess keeps its document. Filled by GET; null on the cancel response.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status