Reference for <systemKey>-datasource-*.json — business metadata, dimensions, foreign keys, capabilities, CIP execution, sync, and exposure.
Source of truth
- Schema file:
external-datasource.schema.json(the documentation anchor mirrors the Dataplane source; the Builder CLI ships the consumer copy) - Schema key:
external-datasource-schema - Version: 2.9.25 (verify in schema
metadata.version)
Validate:
aifabrix validate <datasourceKey>
aifabrix datasource validate <datasourceKey>
Top-level fields (summary)
| Field | Purpose |
|---|---|
key / systemKey |
Datasource and parent system identifiers |
entityType / resourceType |
Business entity classification — entityType enum: documentStorage, vectorStore, recordStorage, messageService, serviceContract, none; resourceType is a catalog key |
fieldMappings |
Attribute normalization rules (raw/foreign-key values to normalized attributes); keys must match metadataSchema |
dimensions |
Root-level ABAC dimension bindings (not nested under fieldMappings) — see Configure business policies |
foreignKeys |
Cross-system relationships |
capabilities |
Operation keys bound to openapi / execution.cip operations, with optional risk metadata |
execution |
Execution engine configuration — cip (native), python, or datasource-chaining |
documentStorage |
Binary operation binding, processing and ingestion eligibility for document entities |
sync |
enabled, direction, full-set schedule, batch size, and optional incrementalKey / incrementalSchedule — see Configure sync |
exposed |
REST/MCP publication flags |
externalSpec |
Authoritative vendor/API spec reference for this datasource |
Important rules
lookup(matchField, matchValue, resultField, fallback) selects a value from an array of objects by a labelled relationship. It requires datasource schema 2.9.15 or later and a runtime that registers lookup; updating the schema alone does not upgrade an older runtime. Matching preserves string, number and boolean types. Multiple matches must agree on the result and its type. The optional fallback applies only to null input or no match; malformed arrays, missing or empty matching results, and conflicting matches fail. Function-based mappings are non-invertible: set an explicit writePath if the field must support writes. This uses the existing mapping DSL and requires no database migration.
- Root
externalSpecis the datasource-grade contract source; system JSON OpenAPI/MCP are hints only. - Dimensions and
foreignKeysdrive ABAC and Enterprise Knowledge relationships. callerIdentityEdgewas removed in 2.9.22. Model a caller's own rows through governed record identity, required local dimensions, and foreign-key relationships. A manifest that still declarescallerIdentityEdgemust drop it before upgrading.- Published MCP/REST tools deduplicate to enterprise capability keys at compile time.
- Custom CIP reads use their declared read shape. Core
listandsearchare list reads and coregetis an item read. A custom read returning several records declaresshape: list; one returning one record declaresshape: get. A custom read with no read shape returns one result and remains callable by its own operation name. - Field-mapping expressions may read request values through
parameters.<path>. Caller inputs and write data are at the root; record id and path parameters are underparameters.operation.<pathParam>.raw.*reads only the provider response. Request parameters cannot provideexternalIdor a primary-key attribute. - A CIP operation
inputproperty whose value is a system key may declarex-aifabrix-refersTo(2.9.25, optional).existingSystemmeans the value names a system the caller can see;newSystemKeymeans the value is the key of a system the operation creates, which must not already exist. The keyword is allowed oninput.properties.<name>and one level down on a nested object input'sproperties.<child>. Publish refuses it on a property that is not typestring, with any other value, or anywhere else in the input schema. An operation may declare several such inputs. The value comes only from a stated identifier or the model's own argument, never from prose, and a declared input is never stripped as the host routing key. Existing manifests still validate. - CIP write
shapeaccepts declaredcreate,update,upsert, anddelete. An upsert composes the datasource's standard create and update operations and fails closed when identity or branch permission is unresolved. - CIP
fetch.responseTypeacceptsjson(default) orbinary; binary fetch is supported foropenapiandhttp.output.mode: documentsrequires enabled document storage and emits stored-document references. A keyed-onlygetneeds no list operation. See Build a document storage entity. - HTTP response-normalization host allowlists name hosts, not arbitrary URL substrings. An entry such as
example.comcovers that host and its subdomains;example.com.attacker.invalidand a URL containingexample.comonly in its path are outside that boundary. The schema descriptions also limit native redirect authorization forwarding to the request's own origin. Confirm runtime support before relying on redirect behavior; a schema refresh alone does not upgrade the runtime. - A new sync configuration defaults to enabled monthly UTC. Existing schedule-less configurations remain manual-only;
sync.enabled: falseblocks synchronization while retaining schedule settings. - This page summarizes fields — it is not a second schema. When prose and JSON Schema conflict, the schema file wins.