# Get source definition spec Retrieve the JSON schema specification for a source definition, describing the configuration fields needed to set up a connector of this type. Returns the configuration specification (JSON schema) for a given source definition. Use this to dynamically render configuration forms or validate source configuration before creating a source. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). **`definition_id`** string required The source definition ID to retrieve the spec for. ## Returns A specification object containing `connection_specification` (JSON schema describing the required and optional configuration fields), along with metadata such as `documentation_url` and `supported_destination_sync_modes`. Request ```bash cURL curl "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/source-definitions/def_abc123/spec" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") spec = client.knowledge_connectors.get_source_definition_spec( organization_id="org_xyz789", definition_id="def_abc123", ) print(spec) ``` ```python Python import requests org_id = "org_xyz789" definition_id = "def_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/connectors/source-definitions/{definition_id}/spec" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript JavaScript const response = await fetch( "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/source-definitions/def_abc123/spec", { headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "connection_specification": { "type": "object", "required": ["api_key"], "properties": { "api_key": { "type": "string", "title": "API Key", "description": "The API key for authenticating with the service.", "airbyte_secret": true }, "start_date": { "type": "string", "title": "Start Date", "description": "UTC date in YYYY-MM-DD format. Data before this date will not be synced.", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" } } }, "documentation_url": "https://docs.example.com/source-setup" } ``` ```json 4xx Error { "success": false, "error": { "code": "CONNECTOR_DEFINITION_NOT_FOUND", "message": "The connector definition was not found.", "type": "client_error", "status": 404, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-12-22T15:30:00Z" } } ``` ## Related Resources - [Source Definitions](/docs/api-reference/knowledge-connectors/source-definitions) - [Sources](/docs/api-reference/knowledge-connectors/sources) - [Source Testing](/docs/api-reference/knowledge-connectors/source-testing)