Skip to navigation

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_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 nullOptionalformat: "date-time"

When the job started execution (ISO 8601)

completed_atstring or nullOptionalformat: "date-time"

When the job finished (ISO 8601). Null if still running.

duration_secondsdouble or nullOptional
Total execution time in seconds. Null if still running.
entities_insertedintegerOptionalDefaults to 0
Number of new entities created during this sync
entities_updatedintegerOptionalDefaults to 0
Number of existing entities updated during this sync
entities_deletedintegerOptionalDefaults to 0
Number of entities removed during this sync
entities_failedintegerOptionalDefaults to 0
Number of entities that failed to process
errorstring or nullOptional
Error message if the job failed
error_categoryenum or nullOptional

Error category for credential errors (e.g. oauth_credentials_expired)

error_detailsmap from strings to any or nullOptional
Additional error context for debugging

Errors

404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error