Cancels a running or pending enrichment job. This is an idempotent operation—calling it multiple times with the same jobId is safe and returns the current status.
Behavior
- Jobs in PENDING or RUNNING status transition to CANCELLED
- Jobs in RUNNING state may not be cancellable once they have progressed to certain processing stages
- Jobs already in terminal states (COMPLETED, FAILED, TIMED_OUT) cannot be cancelled; the operation returns a ConflictingOperationException
- Cancelling an already-CANCELLED job is a no-op and returns the current status (idempotent behavior)
- The API responds immediately after recording the cancellation
- Cleanup of job resources happens asynchronously in the background
When to Cancel
Cancel a job when:
- The job is taking longer than expected
- The job was created with incorrect parameters
- You no longer need the results
Idempotency
You can safely retry cancellation requests. Calling CancelEnrichmentJob multiple times for the same job returns the current status without error as long as the job is not in a terminal state other than CANCELLED.