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_idstringRequiredformat: "uuid"
Unique identifier of the source connection (UUID)
job_idstringRequiredformat: "uuid"
Unique identifier of the sync job to cancel (UUID)
Response
Job with cancellation status
idstringformat: "uuid"
Unique identifier of the sync job
source_connection_idstringformat: "uuid"
ID of the source connection this job belongs to
statusenum
Current status: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, or CANCELLING
started_atstring or nullformat: "date-time"
When the job started execution (ISO 8601)
completed_atstring or nullformat: "date-time"
When the job finished (ISO 8601). Null if still running.
duration_secondsdouble or null
Total execution time in seconds. Null if still running.
entities_insertedintegerDefaults to 0
Number of new entities created during this sync
entities_updatedintegerDefaults to 0
Number of existing entities updated during this sync
entities_deletedintegerDefaults to 0
Number of entities removed during this sync
entities_failedintegerDefaults to 0
Number of entities that failed to process
errorstring or null
Error message if the job failed
error_categoryenum or null
Error category for credential errors (e.g. oauth_credentials_expired)
State lifecycle: PENDING / RUNNING → CANCELLING → CANCELLED
The API immediately marks the job as CANCELLING in the database.
A cancellation signal is sent to the Temporal workflow.
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.