> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.airweave.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.airweave.ai/_mcp/server.

# List Sync Jobs

GET https://api.airweave.ai/source-connections/{source_connection_id}/jobs

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.

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. The worker is
  gracefully stopping the pipeline and cleaning up destination data.
- **CANCELLED**: Sync was cancelled. The worker has fully stopped
  and destination data cleanup has been scheduled.

Reference: https://docs.airweave.ai/api-reference/source-connections/get-source-connection-jobs-source-connections-source-connection-id-jobs-get

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.airweave.ai` (Production, default)
- `http://localhost:8001` (Local)

## Request

### Path parameters

- `source_connection_id` (string, required) — Unique identifier of the source connection (UUID)

### Query parameters

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

## Response

### 200

List of sync jobs

- `list of SourceConnectionJob`

## Errors

### 404 Not Found Error

Source Connection Not Found

- `detail` (string, required) — Error message describing what was not found

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `detail` (string, required) — Error message explaining the rate limit

## Types

### SourceConnectionJob

A sync job representing a single synchronization run. Sync jobs track the execution of data synchronization from a source connection. Each job includes timing information, entity counts, and error details if applicable.

- `id` (string, required) — Unique identifier of the sync job
- `source_connection_id` (string, required) — ID of the source connection this job belongs to
- `status` (enum, required) — Current status: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED, or CANCELLING
  - Allowed values: `created`, `pending`, `running`, `completed`, `failed`, `cancelling`, `cancelled`
- `started_at` (string, optional, nullable) — When the job started execution (ISO 8601)
- `completed_at` (string, optional, nullable) — When the job finished (ISO 8601). Null if still running.
- `duration_seconds` (double, optional, nullable) — Total execution time in seconds. Null if still running.
- `entities_inserted` (integer, optional, default: 0) — Number of new entities created during this sync
- `entities_updated` (integer, optional, default: 0) — Number of existing entities updated during this sync
- `entities_deleted` (integer, optional, default: 0) — Number of entities removed during this sync
- `entities_failed` (integer, optional, default: 0) — Number of entities that failed to process
- `error` (string, optional, nullable) — Error message if the job failed
- `error_category` (enum, optional, nullable) — Error category for credential errors (e.g. oauth_credentials_expired)
  - Allowed values: `oauth_credentials_expired`, `api_key_invalid`, `auth_provider_account_gone`, `auth_provider_credentials_invalid`, `usage_limit_exceeded`, `rate_limited`
- `error_details` (map from string to any, optional, nullable) — Additional error context for debugging

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Response**

```json
[
  {
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "source_connection_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "created",
    "started_at": "2024-01-15T09:30:00Z",
    "completed_at": "2024-01-15T09:30:00Z",
    "duration_seconds": 1.1,
    "entities_inserted": 0,
    "entities_updated": 0,
    "entities_deleted": 0,
    "entities_failed": 0,
    "error": "string",
    "error_category": "oauth_credentials_expired",
    "error_details": {}
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```typescript
import { AirweaveSDKClient } from "@airweave/sdk";

const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
await client.sourceConnections.getSourceConnectionJobs("550e8400-e29b-41d4-a716-446655440000", {
    limit: 100
});

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```