Cancel a batch job
/lang2fhir/batch/{job_id}/cancelDrives a job to the terminal canceled state on request. Takes no
request body.
Cancel does not delete the job: the job record and any results already
produced are preserved for the normal retention window, the same as a
completed or failed job. Items stop being processed and keep the state
they held at cancellation, so a canceled job's counts may show
unfinished items that never resolve.
Cancel is idempotent: canceling an already-canceled job returns 200
with the job. Canceling a job that has already completed or failed is
a 409.
Path parameters
job_idstringrequiredThe job, now canceled
Response fields
job_idstringrequiredServer-assigned job identifier.
request_idstringoptionalThe idempotency token supplied at create, if any.
statusstringrequiredJob status. completed means every item has finished — some may have
failed, so check counts for the split. failed is a whole-job
failure (the job could not run at all), distinct from individual item
failures, which never fail the job. canceled is a caller-requested
cancellation via POST /lang2fhir/batch/{job_id}/cancel; like the
other terminal states it keeps any results already produced readable
for the retention window.
pendingprocessingcompletedfailedcanceledfinalizedbooleanrequiredWhether the job's item set has been sealed.
total_itemsintegerrequiredThe sealed item count. It is 0 until the job is finalized, so an upload response always reports 0; poll the job after finalize for the real count.
errorobjectoptionalA whole-job failure. Present only on a failed job.
created_atstring (date-time)requiredupdated_atstring (date-time)requiredcompleted_atstring (date-time)optionalWhen the job finished. Absent until then.
expires_atstring (date-time)requiredWhen the job and its stored inputs and results are deleted. Set 7
days out, with the clock restarting when the job reaches completed,
failed, or canceled. At expiry the job's request_id is freed for reuse.