Skip to main content

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 & pathBodyDescription
PATCH /api/datasources/\{id\}/mappingsJSON PatchBulk-edit mappings (e.g. rename, toggle visibility) across the datasource.
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}JSON PatchEdit one mapping.
PUT /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}{ name, ... }Replace a mapping's editable attributes.
DELETE /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/changesDiscard the mapping's unsaved metadata changes (see Mapping metadata).

Editing fields

Method & pathBodyDescription
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fieldsJSON PatchBulk-edit the mapping's fields.
PATCH /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/fields/\{fieldId\}JSON PatchEdit 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.
Method & pathBodyDescription
PUT /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/links/\{linkId\}link definitionUpdate a link (relationship).
DELETE /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/links/\{linkId\}Remove a link.
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/saved-query-filtersfilter definitionSave 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 & pathDescription
POST /api/datasources/\{id\}/_scanRe-scan the datasource, refreshing the mapping/field metadata from the source.
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/_scanRe-scan one mapping.
POST /api/datasources/\{id\}/mappings/\{schemaId\}+\{mappingId\}/_verifyVerify the mapping resolves against the source (used before saving edits).
POST /api/datasources/\{id\}/_search-metadataSearch the source's metadata (schemas/tables/columns).
POST /api/datasources/\{id\}/_field-multi-searchSearch fields across the datasource's mappings.
POST /api/datasources/_field-multi-searchSearch fields across all datasources.

Querying

Method & pathDescription
POST /api/datasources/\{id\}/_queryRun a structured query against the datasource and return rows.
POST /api/datasources/\{id\}/_query-stringCompile a structured query to its native query string (no execution).
POST /api/datasources/\{id\}/_sqlRun raw SQL against the datasource (driver permitting).

Data changes & import

Method & pathDescription
POST /api/datasources/\{id\}/_change-fieldApply a field change (type/definition) to the source where supported.
POST /api/datasources/\{id\}/_import-dataImport data into a mapping's table.
POST /api/datasources/_scan-fileScan an uploaded file to infer its structure (file-based datasources).

Legacy i4 import

Method & pathDescription
POST /api/datasources/i4importImport datasource definitions from an Informer 4 export.
GET /api/datasources/i4scan/\{id\}Read the progress/result of an i4 scan.