For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Fork this repoGet a demo
  • Docs
    • Welcome
    • Quickstart
    • Concepts
    • Search
    • MCP Server
    • CLI
    • Agent Skills
    • Connect
    • Add New Connector
    • Rate Limits
  • API Reference
      • GETList Source Connections
      • GETGet Source Connection
      • GETList Sync Jobs
      • POSTCreate Source Connection
      • PATCHUpdate Source Connection
      • POSTRun Sync
      • POSTCancel Sync Job
      • DELDelete Source Connection
LogoLogo
Fork this repoGet a demo
API ReferenceSource Connections

Run Sync

POST
/source-connections/:source_connection_id/run
POST
/source-connections/:source_connection_id/run
1import requests
2
3url = "https://api.airweave.ai/source-connections/550e8400-e29b-41d4-a716-446655440000/run"
4
5headers = {"x-api-key": "<apiKey>"}
6
7response = requests.post(url, headers=headers)
8
9print(response.json())
1{
2 "id": "770e8400-e29b-41d4-a716-446655440002",
3 "source_connection_id": "550e8400-e29b-41d4-a716-446655440000",
4 "status": "created",
5 "started_at": "2024-03-15T12:00:00Z",
6 "completed_at": "2024-03-15T12:05:32Z",
7 "duration_seconds": 332.5,
8 "entities_inserted": 45,
9 "entities_updated": 12,
10 "entities_deleted": 3,
11 "entities_failed": 0
12}
Trigger a data synchronization job for a source connection. Starts an asynchronous sync job that pulls the latest data from the connected source. The job runs in the background and you can monitor its progress using the jobs endpoint. For continuous sync connections, this performs an incremental sync by default. Use `force_full_sync=true` to perform a complete re-sync of all data.
Was this page helpful?
Previous

Cancel Sync Job

Next
Built with

Trigger a data synchronization job for a source connection.

Starts an asynchronous sync job that pulls the latest data from the connected source. The job runs in the background and you can monitor its progress using the jobs endpoint.

For continuous sync connections, this performs an incremental sync by default. Use force_full_sync=true to perform a complete re-sync of all data.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

source_connection_idstringRequiredformat: "uuid"

Unique identifier of the source connection to sync (UUID)

Query parameters

force_full_syncbooleanOptionalDefaults to false

Force a full sync ignoring cursor data. Only applies to continuous sync connections. Non-continuous connections always perform full syncs.

Response

Created sync job
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 nullformat: "date-time"

When the job started execution (ISO 8601)

completed_atstring or nullformat: "date-time"

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

duration_secondsdouble or null
Total execution time in seconds. Null if still running.
entities_insertedintegerDefaults to 0
Number of new entities created during this sync
entities_updatedintegerDefaults to 0
Number of existing entities updated during this sync
entities_deletedintegerDefaults to 0
Number of entities removed during this sync
entities_failedintegerDefaults to 0
Number of entities that failed to process
errorstring or null
Error message if the job failed
error_categoryenum or null

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

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

Errors

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