Mappings API
Auto-generated from codebase analysis
This section documents the Mappings API endpoints.
GET Endpoints
GET /mappings
Get all mapping files from the current workspace.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
include_workspace | bool | No |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /mappings/{table_name}
Get the complete mapping file for a table including transformations and metadata
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings/{table_name}" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /mappings/{table_name}/dbt-code
Get the generated DBT SQL code for a specific table if it exists.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings/{table_name}/dbt-code" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /mappings/{table_name}/field-dbt/{target_field}
Get the current DBT SQL expression for a specific field.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
target_field | str | Yes |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings/{table_name}/field-dbt/{target_field}" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /mappings/{table_name}/tables
Get all table relationships for a mapping
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings/{table_name}/tables" \
-H "Authorization: Bearer YOUR_TOKEN"
GET /mappings/{table_name}/wildcard/effective
Get the effective field mappings for a wildcard table-to-table mapping.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X GET "https://your-instance.datalinx.ai/api/mappings/{table_name}/wildcard/effective" \
-H "Authorization: Bearer YOUR_TOKEN"
POST Endpoints
POST /mappings/{table_name}/generate-code
Generate Python mapping code for a specific table on-demand.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/generate-code" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/batch/dbt-code
Get the generated DBT SQL code for multiple tables in a single call.
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/batch/dbt-code" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/connection
Create or update a connection between source and target fields
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
connection | ConnectionRequest | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/connection" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/transformation
Add or update a transformation for a target field
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
transformation | TransformationRequest | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/transformation" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/resolve-ambiguity
Resolve an ambiguity in the mapping
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resolve_input | dict | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/resolve-ambiguity" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/preview-transformation
Generate a preview of DBT transformation code for a single field.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/preview-transformation" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/transformation-diff
Get a diff showing what changes would be made if this transformation is committed.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/transformation-diff" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/commit-transformation
Commit a transformation by:
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/commit-transformation" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/tables
Add or update a table relationship (primary or with join expression)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/tables" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/tables/validate
Validate table relationships for testing
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/tables/validate" \
-H "Authorization: Bearer YOUR_TOKEN"
POST /mappings/{table_name}/materialize
Materialize a mapped table through Dagster pipeline execution.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes |
Example Request
curl -X POST "https://your-instance.datalinx.ai/api/mappings/{table_name}/materialize" \
-H "Authorization: Bearer YOUR_TOKEN"
DELETE Endpoints
DELETE /mappings/{table_name}/connection
Delete a specific field connection
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
source_field | str | Yes | |
target_field | str | Yes |
Example Request
curl -X DELETE "https://your-instance.datalinx.ai/api/mappings/{table_name}/connection" \
-H "Authorization: Bearer YOUR_TOKEN"
DELETE /mappings/{table_name}/transformation/{target_field}
Delete a transformation from a field mapping
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
target_field | str | Yes |
Example Request
curl -X DELETE "https://your-instance.datalinx.ai/api/mappings/{table_name}/transformation/{target_field}" \
-H "Authorization: Bearer YOUR_TOKEN"
DELETE /mappings/clear-all
Clear all mappings from the current workspace with extra confirmation
Example Request
curl -X DELETE "https://your-instance.datalinx.ai/api/mappings/clear-all" \
-H "Authorization: Bearer YOUR_TOKEN"
DELETE /mappings/{table_name}/tables/{source_table}
Remove a table relationship
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_name | str | Yes | |
source_table | str | Yes |
Example Request
curl -X DELETE "https://your-instance.datalinx.ai/api/mappings/{table_name}/tables/{source_table}" \
-H "Authorization: Bearer YOUR_TOKEN"