Editing mappings & scanning
These endpoints mutate scanned metadata or run live operations against the
underlying data source. Their responses depend on the live source and on prior
edits, so they are documented by contract (no captured example) — the same way
billing's live License Manager routes are. All require the datasource:write
permission (writeStrict).
Editing mappings
Mappings and fields are edited with JSON Patch (RFC 6902) — a payload that is
an array of { op, path, value } operations.
| Method & path | Body | Description |
|---|
PATCH /api/datasources/\{id\}/mappings | JSON Patch | Bulk-edit mappings (e.g. rename, toggle visibility) across the datasource. |
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\} | JSON Patch | Edit one mapping. |
PUT /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\} | { name, ... } | Replace a mapping's editable attributes. |
DELETE /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/changes | — | Discard the mapping's unsaved metadata changes (see Mapping metadata). |
Editing fields
| Method & path | Body | Description |
|---|
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fields | JSON Patch | Bulk-edit the mapping's fields. |
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fields/\{fieldId\} | JSON Patch | Edit one field. |
PUT /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fields/\{fieldId\} | { name, ... } | Replace a field's editable attributes. |
DELETE /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fields/\{fieldId\} | — | Remove a (computed) field. |
Editing links
| Method & path | Body | Description |
|---|
PUT /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/links/\{linkId\} | link definition | Update a link (relationship). |
DELETE /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/links/\{linkId\} | — | Remove a link. |
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/saved-query-filters | filter definition | Save a query filter on the mapping (the matching GET is documented under Mapping metadata). |
Scanning & verifying
These connect to the live source. Responses (discovered tables/columns, row
counts, timings) vary per environment and run.
| Method & path | Description |
|---|
POST /api/datasources/\{id\}/_scan | Re-scan the datasource, refreshing the mapping/field metadata from the source. |
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/_scan | Re-scan one mapping. |
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/_verify | Verify the mapping resolves against the source (used before saving edits). |
POST /api/datasources/\{id\}/_search-metadata | Search the source's metadata (schemas/tables/columns). |
POST /api/datasources/\{id\}/_field-multi-search | Search fields across the datasource's mappings. |
POST /api/datasources/_field-multi-search | Search fields across all datasources. |
Querying
| Method & path | Description |
|---|
POST /api/datasources/\{id\}/_query | Run a structured query against the datasource and return rows. |
POST /api/datasources/\{id\}/_query-string | Compile a structured query to its native query string (no execution). |
POST /api/datasources/\{id\}/_sql | Run raw SQL against the datasource (driver permitting). |
Data changes & import
| Method & path | Description |
|---|
POST /api/datasources/\{id\}/_change-field | Apply a field change (type/definition) to the source where supported. |
POST /api/datasources/\{id\}/_import-data | Import data into a mapping's table. |
POST /api/datasources/_scan-file | Scan an uploaded file to infer its structure (file-based datasources). |
Legacy i4 import
| Method & path | Description |
|---|
POST /api/datasources/i4import | Import datasource definitions from an Informer 4 export. |
GET /api/datasources/i4scan/\{id\} | Read the progress/result of an i4 scan. |