# Field mappings Get and update field transformation mappings (hashing, renaming, filtering) for a connection. ## Get mappings Returns the field transformation mappings configured for a connection. #### Path Parameters **`connection_id`** string required The connection ID. ## Update mappings Set hashing, renaming, or filtering rules per stream. #### Request Body **`mappings`** array required Array of mapping rules. Mapper types include `hashing`, `field_renaming`, and `row_filtering`. ## Returns A mappings object containing a `mappings` array with transformation rules. Request ```bash cURL curl "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/connections/conn_abc123/mappings" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") mappings = client.knowledge_connectors.get_mappings( organization_id="org_xyz789", connection_id="conn_abc123", ) print(mappings) ``` ```python Python import requests org_id = "org_xyz789" conn_id = "conn_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/knowledge/connectors/connections/{conn_id}/mappings" 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/connections/conn_abc123/mappings", { headers: { Authorization: "Bearer YOUR_ACCESS_TOKEN" }, } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "mappings": [ { "type": "hashing", "stream_name": "users", "field": "email", "algorithm": "sha256" }, { "type": "field_renaming", "stream_name": "orders", "source_field": "orderDate", "target_field": "order_date" } ] } ``` ```json 4xx Error { "success": false, "error": { "code": "CONNECTOR_CONNECTION_NOT_FOUND", "message": "The requested connection was not found.", "type": "client_error", "status": 404, "details": {}, "trace_id": "abc-123-def", "timestamp": "2025-12-22T15:30:00Z" } } ``` ## Related Resources - [Manage Connections](/docs/api-reference/knowledge-connectors/connections) - [Stream Configuration](/docs/api-reference/knowledge-connectors/stream-config)