Cancel Sync Job
Request cancellation of a running sync job.
**State lifecycle**: `PENDING` / `RUNNING` → `CANCELLING` → `CANCELLED`
1. The API immediately marks the job as **CANCELLING** in the database.
2. A cancellation signal is sent to the Temporal workflow.
3. The worker receives the signal, gracefully stops the sync pipeline
(cancels worker pool, source stream), and marks the job as **CANCELLED**.
Already-processed entities are retained in the vector database.
If the worker is unresponsive, a background cleanup job will force the
transition to CANCELLED after 3 minutes.
**Note**: Only jobs in `PENDING` or `RUNNING` state can be cancelled.
Attempting to cancel a `COMPLETED`, `FAILED`, or `CANCELLED` job returns 400.
Authentication
x-api-keystring
API Key authentication via header
Path parameters
source_connection_id
Unique identifier of the source connection (UUID)
job_id
Unique identifier of the sync job to cancel (UUID)
Response
Job with cancellation status
id
Unique identifier of the sync job
source_connection_id
ID of the source connection this job belongs to
status
Current status: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, or CANCELLING
started_at
When the job started execution (ISO 8601)
completed_at
When the job finished (ISO 8601). Null if still running.
duration_seconds
Total execution time in seconds. Null if still running.
entities_inserted
Number of new entities created during this sync
entities_updated
Number of existing entities updated during this sync
entities_deleted
Number of entities removed during this sync
entities_failed
Number of entities that failed to process
error
Error message if the job failed
error_details
Additional error context for debugging