# Test connection Validate connection configuration before creating a connection (dry-run). Tests whether a source can connect to a destination with the given configuration, without creating a persistent connection. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). #### Request Body **`source_id`** string required Source to test connectivity for. **`destination_id`** string optional Destination to test against. **`configurations`** object optional Configuration to validate. ## Returns A test result object containing `status` and optional `message`. Request ```bash cURL curl -X POST "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/connections/test" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"source_id": "src_abc123"}' ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.knowledge_connectors.test_connection( organization_id="org_xyz789", source_id="src_abc123", ) print(result) ``` ```python Python import requests org_id = "org_xyz789" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/connectors/connections/test" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json"} body = {"source_id": "src_abc123"} response = requests.post(url, headers=headers, json=body) print(response.json()) ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/connections/test", { method: "POST", headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json", }, body: JSON.stringify({ source_id: "src_abc123" }), } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "status": "succeeded", "message": "Connection test passed" } ``` ```json 4xx Error { "success": false, "error": { "code": "CONNECTOR_INVALID_CONFIG", "message": "The connector configuration is invalid.", "type": "client_error", "status": 400, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-12-22T15:30:00Z" } } ``` ## Related Resources - [Manage Connections](/docs/api-reference/knowledge-connectors/connections) - [Source Testing](/docs/api-reference/knowledge-connectors/source-testing)