v50

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-222763184.3 KB
source-connections

Cancel Sync Job

Request cancellation of a running sync job.

State lifecycle: PENDING / RUNNINGCANCELLINGCANCELLED

  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.

post/source-connections/{source_connection_id}/jobs/{job_id}/cancel

Path parameters

source_connection_idstring uuid required

Unique identifier of the source connection (UUID)

Example:550e8400-e29b-41d4-a716-446655440000

Unique identifier of the source connection (UUID)

job_idstring uuid required

Unique identifier of the sync job to cancel (UUID)

Example:660e8400-e29b-41d4-a716-446655440001

Unique identifier of the sync job to cancel (UUID)

Response

Job with cancellation status

idstring uuid required

Unique identifier of the sync job

source_connection_idstring uuid required

ID of the source connection this job belongs to

status'created' | 'pending' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled' required

Sync job status enum.

started_atstring date-time nullable

When the job started execution (ISO 8601)

completed_atstring date-time nullable

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

duration_secondsnumber nullable

Total execution time in seconds. Null if still running.

entities_insertedinteger

Number of new entities created during this sync

entities_updatedinteger

Number of existing entities updated during this sync

entities_deletedinteger

Number of entities removed during this sync

entities_failedinteger

Number of entities that failed to process

errorstring nullable

Error message if the job failed

error_detailsobject nullable

Additional error context for debugging

Example response

{
  "completed_at": "2024-03-15T12:05:32Z",
  "duration_seconds": 332.5,
  "entities_deleted": 3,
  "entities_failed": 0,
  "entities_inserted": 45,
  "entities_updated": 12,
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "source_connection_id": "550e8400-e29b-41d4-a716-446655440000",
  "started_at": "2024-03-15T12:00:00Z",
  "status": "COMPLETED"
}