Source Connections
API endpoints for managing live connections to data sources. Source connections are the configured instances Graffo uses to sync data from your apps and databases into collections
List source connections with minimal fields for performance.
Organization API key for authentication
Filter by collection readable ID
0100Successful Response
Validation Error
GET /source-connections HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"short_name": "text",
"readable_collection_id": "text",
"created_at": "2025-12-06T05:40:15.841Z",
"modified_at": "2025-12-06T05:40:15.841Z",
"is_authenticated": true,
"entity_count": 0,
"federated_search": false,
"auth_method": "direct",
"status": "active"
}
]Create a new source connection.
The authentication configuration determines the flow:
DirectAuthentication: Immediate creation with provided credentials
OAuthBrowserAuthentication: Returns shell with authentication URL
OAuthTokenAuthentication: Immediate creation with provided token
AuthProviderAuthentication: Using external auth provider
BYOC (Bring Your Own Client) is detected when client_id and client_secret are provided in OAuthBrowserAuthentication.
sync_immediately defaults:
True for: direct, oauth_token, auth_provider
False for: oauth_browser, oauth_byoc (these sync after authentication)
Organization API key for authentication
Create source connection with nested authentication.
Connection name (defaults to '{Source Name} Connection')
Source identifier (e.g., 'slack', 'github')
Collection readable ID
Connection description
Source-specific configuration
Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication)
Authentication config (defaults to OAuth browser flow for OAuth sources)
URL to redirect to after OAuth flow completes (only used for OAuth flows)
Successful Response
Validation Error
POST /source-connections HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 322
{
"name": "text",
"short_name": "text",
"readable_collection_id": "text",
"description": "text",
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"continuous": false,
"cursor_field": "text"
},
"sync_immediately": true,
"authentication": {
"credentials": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"redirect_url": "text"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"short_name": "text",
"readable_collection_id": "text",
"status": "active",
"created_at": "2025-12-06T05:40:15.841Z",
"modified_at": "2025-12-06T05:40:15.841Z",
"auth": {
"method": "direct",
"authenticated": true,
"authenticated_at": "2025-12-06T05:40:15.841Z",
"expires_at": "2025-12-06T05:40:15.841Z",
"auth_url": "text",
"auth_url_expires": "2025-12-06T05:40:15.841Z",
"redirect_url": "text",
"provider_readable_id": "text",
"provider_id": "text"
},
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"next_run": "2025-12-06T05:40:15.841Z",
"continuous": false,
"cursor_field": "text",
"cursor_value": null
},
"sync": {
"total_runs": 0,
"successful_runs": 0,
"failed_runs": 0,
"last_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text"
}
},
"sync_id": "123e4567-e89b-12d3-a456-426614174000",
"entities": {
"total_entities": 0,
"by_type": {
"ANY_ADDITIONAL_PROPERTY": {
"count": 1,
"last_updated": "2025-12-06T05:40:15.841Z"
}
}
},
"federated_search": false
}Get a source connection with optional depth expansion.
Organization API key for authentication
Successful Response
Validation Error
GET /source-connections/{source_connection_id} HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"short_name": "text",
"readable_collection_id": "text",
"status": "active",
"created_at": "2025-12-06T05:40:15.841Z",
"modified_at": "2025-12-06T05:40:15.841Z",
"auth": {
"method": "direct",
"authenticated": true,
"authenticated_at": "2025-12-06T05:40:15.841Z",
"expires_at": "2025-12-06T05:40:15.841Z",
"auth_url": "text",
"auth_url_expires": "2025-12-06T05:40:15.841Z",
"redirect_url": "text",
"provider_readable_id": "text",
"provider_id": "text"
},
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"next_run": "2025-12-06T05:40:15.841Z",
"continuous": false,
"cursor_field": "text",
"cursor_value": null
},
"sync": {
"total_runs": 0,
"successful_runs": 0,
"failed_runs": 0,
"last_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text"
}
},
"sync_id": "123e4567-e89b-12d3-a456-426614174000",
"entities": {
"total_entities": 0,
"by_type": {
"ANY_ADDITIONAL_PROPERTY": {
"count": 1,
"last_updated": "2025-12-06T05:40:15.841Z"
}
}
},
"federated_search": false
}Delete a source connection and all related data.
Organization API key for authentication
Successful Response
Validation Error
DELETE /source-connections/{source_connection_id} HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"short_name": "text",
"readable_collection_id": "text",
"status": "active",
"created_at": "2025-12-06T05:40:15.841Z",
"modified_at": "2025-12-06T05:40:15.841Z",
"auth": {
"method": "direct",
"authenticated": true,
"authenticated_at": "2025-12-06T05:40:15.841Z",
"expires_at": "2025-12-06T05:40:15.841Z",
"auth_url": "text",
"auth_url_expires": "2025-12-06T05:40:15.841Z",
"redirect_url": "text",
"provider_readable_id": "text",
"provider_id": "text"
},
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"next_run": "2025-12-06T05:40:15.841Z",
"continuous": false,
"cursor_field": "text",
"cursor_value": null
},
"sync": {
"total_runs": 0,
"successful_runs": 0,
"failed_runs": 0,
"last_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text"
}
},
"sync_id": "123e4567-e89b-12d3-a456-426614174000",
"entities": {
"total_entities": 0,
"by_type": {
"ANY_ADDITIONAL_PROPERTY": {
"count": 1,
"last_updated": "2025-12-06T05:40:15.841Z"
}
}
},
"federated_search": false
}Update a source connection.
Updateable fields:
name, description
config_fields
cron_schedule
auth_fields (direct auth only)
Organization API key for authentication
Update schema for source connections.
Source-specific configuration
Authentication config (defaults to OAuth browser flow for OAuth sources)
Successful Response
Validation Error
PATCH /source-connections/{source_connection_id} HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 224
{
"name": "text",
"description": "text",
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"continuous": false,
"cursor_field": "text"
},
"authentication": {
"credentials": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"short_name": "text",
"readable_collection_id": "text",
"status": "active",
"created_at": "2025-12-06T05:40:15.841Z",
"modified_at": "2025-12-06T05:40:15.841Z",
"auth": {
"method": "direct",
"authenticated": true,
"authenticated_at": "2025-12-06T05:40:15.841Z",
"expires_at": "2025-12-06T05:40:15.841Z",
"auth_url": "text",
"auth_url_expires": "2025-12-06T05:40:15.841Z",
"redirect_url": "text",
"provider_readable_id": "text",
"provider_id": "text"
},
"config": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"schedule": {
"cron": "text",
"next_run": "2025-12-06T05:40:15.841Z",
"continuous": false,
"cursor_field": "text",
"cursor_value": null
},
"sync": {
"total_runs": 0,
"successful_runs": 0,
"failed_runs": 0,
"last_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text"
}
},
"sync_id": "123e4567-e89b-12d3-a456-426614174000",
"entities": {
"total_entities": 0,
"by_type": {
"ANY_ADDITIONAL_PROPERTY": {
"count": 1,
"last_updated": "2025-12-06T05:40:15.841Z"
}
}
},
"federated_search": false
}Trigger a sync run for a source connection.
Runs are always executed through Temporal workflow engine.
Args: db: Database session source_connection_id: ID of the source connection to run ctx: API context with organization and user information guard_rail: Guard rail service for usage limits force_full_sync: If True, forces a full sync with orphaned entity cleanup for continuous syncs. Raises 400 error if used on non-continuous syncs (which are always full syncs).
Organization API key for authentication
Force a full sync ignoring cursor data instead of waiting for the daily cleanup schedule. Only allowed for continuous syncs.
falseSuccessful Response
Validation Error
POST /source-connections/{source_connection_id}/run HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"source_connection_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text",
"error_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Get sync jobs for a source connection.
Organization API key for authentication
100Successful Response
Validation Error
GET /source-connections/{source_connection_id}/jobs HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"source_connection_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text",
"error_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]Cancel a running sync job for a source connection.
This endpoint requests cancellation and marks the job as CANCELLING. The workflow updates the final status to CANCELLED when it processes the cancellation request.
Organization API key for authentication
Successful Response
Validation Error
POST /source-connections/{source_connection_id}/jobs/{job_id}/cancel HTTP/1.1
Host: api.graffo.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"source_connection_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "created",
"started_at": "2025-12-06T05:40:15.841Z",
"completed_at": "2025-12-06T05:40:15.841Z",
"duration_seconds": 1,
"entities_inserted": 0,
"entities_updated": 0,
"entities_deleted": 0,
"entities_failed": 0,
"error": "text",
"error_details": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Last updated
