Overview
Cancel a sync job that is currently running or pending. The job will be gracefully stopped and marked as cancelled.
Cancellation Behavior:
- Jobs in
pending or in_progress status can be cancelled
- Cancellation is graceful - the current operation completes before stopping
- Partial data may be committed depending on when cancellation occurs
- Status transitions:
in_progress → cancelling → cancelled
Note: This endpoint is not yet implemented in the current codebase. The endpoint structure is defined but the cancel operation needs to be added to the sync service.
Path Parameters
Unique UUID identifier of the sync job to cancelExample: “770e8400-e29b-41d4-a716-446655440002”
Response
Returns the updated sync job object with cancelling or cancelled status.
Updated job status: cancelling or cancelled
Updated timestamp when cancellation was requested (ISO 8601)
Example Request
curl -X POST https://api.airweave.ai/v1/sync/jobs/770e8400-e29b-41d4-a716-446655440002/cancel \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"sync_id": "660e8400-e29b-41d4-a716-446655440001",
"status": "cancelling",
"modified_at": "2024-03-20T10:03:15Z"
}
Error Responses
Sync job with the specified ID does not exist or does not belong to your organization
Job cannot be cancelled (already completed, failed, or cancelled)
Missing or invalid authentication
Cancel functionality is not yet implemented