# Manage jobs List, trigger, and cancel sync and reset jobs. ## List jobs Returns jobs with optional filtering by connection, type, status, and date range. #### Query Parameters **`connection_id`** string optional Filter by connection ID. **`job_type`** string optional Filter by type: `sync` or `reset`. **`status`** string optional Filter by status (e.g., `running`, `succeeded`, `failed`). **`limit`** integer optional Maximum number of results. **`offset`** integer optional Pagination offset. **`order_by`** string optional Sort order field. ## Get job Retrieve a single job by ID. #### Path Parameters **`job_id`** string required The job ID. ## Trigger job Start a new sync or reset job. #### Request Body **`connection_id`** string required Connection to trigger the job for. **`job_type`** string required Job type: `sync` or `reset`. ## Cancel job Cancel a running job. Returns 204 No Content on success. ## Returns A job object containing `job_id`, `status`, `job_type`, `start_time`, `connection_id`, `bytes_synced`, `rows_synced`, and `duration`. Request ```bash cURL curl "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/jobs?connection_id=conn_abc123" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") jobs = client.knowledge_connectors.list_jobs( organization_id="org_xyz789", connection_id="conn_abc123", ) print(jobs) ``` ```python Python import requests org_id = "org_xyz789" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/connectors/jobs" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} params = {"connection_id": "conn_abc123"} response = requests.get(url, headers=headers, params=params) print(response.json()) ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/jobs?connection_id=conn_abc123", { headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "data": [ { "job_id": "job_abc123", "status": "succeeded", "job_type": "sync", "start_time": "2024-06-15T10:00:00Z", "connection_id": "conn_abc123", "bytes_synced": 1048576, "rows_synced": 5000, "duration": "PT2M30S" } ], "total": 1 } ``` ```json 4xx Error { "success": false, "error": { "code": "CONNECTOR_JOB_NOT_FOUND", "message": "The requested job was not found.", "type": "client_error", "status": 404, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-12-22T15:30:00Z" } } ``` ## Related Resources - [Job Retry](/docs/api-reference/knowledge-connectors/job-retry) - [Job Logs](/docs/api-reference/knowledge-connectors/job-logs) - [Manage Connections](/docs/api-reference/knowledge-connectors/connections)