Suggest import column mappings
Settings module
POST/aurora/map-columnsaurora.mapColumns
Suggests a target field for each import column. The import wizard shows the suggestions for the caller to accept or change. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability home.dashboard.read.
- OAuth scopes: home.
- Send an Idempotency-Key header. A replay with the same key returns the original response.
- Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.
Request body: AuroraMapColumnsRequest
| Field | Type | Required | Description |
|---|---|---|---|
| collection | string | Yes | Import target.Constraints: pattern ^[a-z][a-z0-9-]*$ |
| columns | array of object | Yes | Import columns with sample values. |
| fields | array of object | Yes | Target fields of the collection. |
{
"collection": "people",
"columns": [
{
"header": "E-mail",
"samples": [
"crew@example.com"
]
}
],
"fields": [
{
"name": "email",
"description": "Email address."
}
]
}Response 200: AuroraResult
| Field | Type | Required | Description |
|---|---|---|---|
| outcome | "answer" | "no_answer" | "failed" | Yes | answer, no_answer (the data does not support an answer; `missing` says why) or failed (the model call failed and was logged). |
| ai_generated | true | Yes | Always true: the content is AI-generated and is labeled so (EU AI Act Article 50). |
| request_id | string (uuid) | null | Yes | Identifier of the logged AI request; null when no model was called. |
| model | string | null | Yes | Model that answered.Constraints: length 1 to 100 |
| missing | string | null | Yes | What the data lacks, for no_answer.Constraints: length 1 to 500 |
| failure_code | string | null | Yes | Why the request failed.Constraints: length 1 to 64 |
| answer | object | No | The feature's answer for outcome answer, shaped per operation; null otherwise. |
| suggestions | array of AuroraProposal | Yes | Changes stored for confirmation. |
{
"outcome": "answer",
"ai_generated": true,
"request_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"model": "claude-sonnet-5-5",
"missing": "No budget lines exist yet.",
"failure_code": "model_error",
"answer": {
"text": "One permit is blocked: Fire Marshal Permit.",
"citations": []
},
"suggestions": [
{
"suggestion_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"operation_id": "savedViews.create",
"summary": "Save the view Blocked Miami Permits."
}
]
}Code samples
curl -X POST "$XOS_BASE_URL/aurora/map-columns" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"collection":"people","columns":[{"header":"E-mail","samples":["crew@example.com"]}],"fields":[{"name":"email","description":"Email address."}]}'const { data } = await xos.aurora.mapColumns({
"collection": "people",
"columns": [
{
"header": "E-mail",
"samples": [
"crew@example.com"
]
}
],
"fields": [
{
"name": "email",
"description": "Email address."
}
]
});response = xos.aurora.map_columns({"collection": "people", "columns": [{"header": "E-mail", "samples": ["crew@example.com"]}], "fields": [{"name": "email", "description": "Email address."}]})xos aurora map-columns --data '{"collection":"people","columns":[{"header":"E-mail","samples":["crew@example.com"]}],"fields":[{"name":"email","description":"Email address."}]}'