Skip to main content
GET
/
v1
/
source-connections
/
{id}
/
jobs
List Sync Jobs
curl --request GET \
  --url https://api.example.com/v1/source-connections/{id}/jobs
{
  "id": "<string>",
  "source_connection_id": "<string>",
  "status": "<string>",
  "started_at": "<string>",
  "completed_at": "<string>",
  "duration_seconds": 123,
  "entities_inserted": 123,
  "entities_updated": 123,
  "entities_deleted": 123,
  "entities_failed": 123,
  "error": "<string>",
  "error_details": {}
}

Overview

Retrieve the sync job history for a source connection. Returns a list of sync jobs ordered by creation time (newest first). Each job includes status, timing information, and entity counts.

Path Parameters

id
string
required
Unique UUID identifier of the source connectionExample: “550e8400-e29b-41d4-a716-446655440000”

Query Parameters

limit
integer
default:100
Maximum number of jobs to return (1-1000)

Response

Returns an array of sync job objects.
id
string
required
Unique UUID identifier of the sync job
source_connection_id
string
required
ID of the source connection this job belongs to
status
string
required
Job status: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, or CANCELLING
started_at
string
When the job started execution (ISO 8601)
completed_at
string
When the job finished (ISO 8601)
duration_seconds
number
Total execution time in seconds
entities_inserted
integer
required
Number of new entities created
entities_updated
integer
required
Number of existing entities updated
entities_deleted
integer
required
Number of entities removed
entities_failed
integer
required
Number of entities that failed to process
error
string
Error message if the job failed
error_details
object
Additional error context for debugging

Example Request

curl "https://api.airweave.ai/v1/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "source_connection_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "COMPLETED",
    "started_at": "2024-03-15T12:00:00Z",
    "completed_at": "2024-03-15T12:05:32Z",
    "duration_seconds": 332.5,
    "entities_inserted": 45,
    "entities_updated": 12,
    "entities_deleted": 3,
    "entities_failed": 0,
    "error": null,
    "error_details": null
  },
  {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "source_connection_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "FAILED",
    "started_at": "2024-03-14T08:00:15Z",
    "completed_at": null,
    "duration_seconds": null,
    "entities_inserted": 0,
    "entities_updated": 0,
    "entities_deleted": 0,
    "entities_failed": 0,
    "error": "Authentication failed: GitHub personal access token is invalid or expired",
    "error_details": null
  }
]

Job Statuses

  • PENDING: Job is queued, waiting for the worker to pick it up
  • RUNNING: Sync is actively pulling and processing data
  • COMPLETED: Sync finished successfully
  • FAILED: Sync encountered an unrecoverable error
  • CANCELLING: Cancellation has been requested. Worker is stopping.
  • CANCELLED: Sync was cancelled

Error Responses

404 Not Found
Source connection with the specified ID does not exist