Skip to main content

Import sources

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: import-sources · 4 operations

POST /v1/import/detect​

Auto-detect a document's import format

Sniff a document's format (MFI-1.5) by polling every registered adapter and the built-in format sniffers; the highest-confidence match wins. Recognized-but-not-yet-importable formats (RAML, AsyncAPI, GraphQL, …) are reported with importable: false so the importer can name the format. When two formats tie within the ambiguity margin, ambiguous is true and ambiguous_candidates lists the choices to prompt for.

Operation id: detect_import_format_v1_import_detect_post

Parameters

NameInTypeRequiredDescription
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for auto-detect a document's import format.

Responses

StatusDescriptionBody
200Successful response for auto-detect a document's import format.application/json DetectFormatResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/import/format-capabilities​

Get the source-format capability & parsing-limit registry

Return the versioned source-format capability registry (CPDO-2.4): one entry per registered import source — the native hierarchy its analyzer models, the quality of the source locations it can point at, the value visibility it can ever carry, the grammar it knowingly does not read, how much survives the projection onto the canonical model, and whether the format converts — each stamped with the analyzer key, analyzer version and underlying tool versions that back the claim. The snapshot also carries the reviewed explanation for every way a detail can be absent, and the map from a stored payload-analysis reason code onto those categories. Exactly one category means the source material is missing; a parser limit, a capability boundary, an analyzer failure and a redaction each mean something else. This is static reference data — the same for every tenant and every item — so the UI can fetch it once and cache it by version.

Operation id: get_format_capability_registry_v1_import_format_capabilities_get

Parameters

NameInTypeRequiredDescription
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get the source-format capability & parsing-limit registry.application/json FormatCapabilitySnapshot
422Validation Errorapplication/json HTTPValidationError

GET /v1/import/format-capabilities/{format_key}​

Get one source format's capability entry

Return the capability & parsing-limit entry for a single source format (CPDO-2.4). Always resolves: a reviewed format returns its reviewed entry, any other registered adapter returns one derived from the adapter itself, and a key no adapter is registered under returns an unknown_format entry that claims nothing about the format. That last case is deliberate — a catalog item can name an adapter that was later retired, and a 404 there would leave the UI with exactly the "no details" dead end this registry exists to remove. A key that could never have been registered (wrong character class, or over 64 characters) is a 422 rather than an echo.

Operation id: get_format_capability_v1_import_format_capabilities__format_key__get

Parameters

NameInTypeRequiredDescription
format_keypathstringyesPath parameter identifying the format key segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get one source format's capability entry.application/json FormatCapability
422Validation Errorapplication/json HTTPValidationError

GET /v1/import/sources​

List import sources

Enumerate every registered import-source adapter (MFI-1.1 registry). Drives the ImportDialog source cards (MFI-1.3) and the CLI format list (MFI-1.4): each descriptor carries the Lucide icon, label, description, and the input kinds (file/url/paste/discovery) its card/verb should use.

Operation id: list_import_sources_v1_import_sources_get

Parameters

NameInTypeRequiredDescription
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list import sources.application/json ImportSourceListResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

DetectFormatRequest​

A document (plus optional hints) to auto-detect the format of.

PropertyTypeRequiredDescription
textstring or nullnoRaw document text to sniff (the primary signal).
filenamestring or nullnoOptional filename hint (extension-based signals).
content_typestring or nullnoOptional MIME type hint.
urlstring or nullnoOptional source URL hint.
document_base64string or nullnoStandard base64 of an uploaded archive (.zip / .tar.gz) for multi-file intake (MFI-29.1). When present and the payload is an archive, the root document is auto-detected (or chosen via archive_root).
archive_rootstring or nullnoExplicit module-relative root path inside an uploaded archive.

DetectFormatResponse​

The auto-detection verdict for a document.

PropertyTypeRequiredDescription
matchedbooleanyesWhether any detector recognized the document.
detectedFormatCandidateModel or nullnoThe best candidate, or null when nothing matched.
ambiguousbooleanyesTrue when leading formats tie within the ambiguity margin (prompt the user).
candidatesarray of FormatCandidateModelnoAll distinct-format candidates, ranked.
ambiguous_candidatesarray of FormatCandidateModelnoThe close cluster to choose between when ambiguous; empty otherwise.
archive_rootstring or nullnoWhen the request carried an archive, the chosen root member path.
archive_membersarray of stringnoSorted member paths when an archive was unpacked for detection.

FormatCapability​

The versioned capability & parsing-limit entry for one source format (CPDO-2.4).

Everything a reader needs to know what apiome will ever be able to say about a document of this format, before opening one: the native hierarchy it preserves, the source pointers it can offer, the values it can carry, the grammar it does not read, what survives normalization, and whether it converts — each backed by the analyzer and tool versions in :attr:analyzer.

PropertyTypeRequiredDescription
formatstringyesStable import-source registry key (e.g. edix12).
labelstringyesHuman label for the format.
paradigmstring or nullnoThe canonical paradigm the adapter produces, or null for an unknown format.
provenanceCapabilityProvenanceyesWhether this entry is reviewed, derived from the adapter, or a declaration that the format is unknown.
availabilityFormatAvailabilityyesWhether this format can be imported and analysed in the current runtime.
unavailable_reasonstring or nullnoWhy the format is unavailable here, or null when it is available.
native_hierarchyNativeHierarchyyesNative Hierarchy.
native_hierarchy_notestringyesOne line on what the tree's node vocabulary actually is.
analyzerAnalyzerEvidenceyesThe analyzer and tool versions backing every claim in this entry.
source_locationSourceLocationSupportyesThe best source pointer nodes from this format can carry.
value_visibilityValueVisibilitySupportyesThe value material this format's analysis can ever carry.
supported_constructsarray of stringnoConstruct keys the analyzer models, sorted. Their absence from a tree means they were not in the source.
unsupported_constructsarray of stringnoConstruct keys the analyzer knowingly does not model, sorted — the format's unsupported grammar. Their absence from a tree means nothing about the source.
limitsmap of integernoThe numeric parsing limits in force (node/depth budgets, value preview length), so a bounded record is distinguishable from a small one.
canonical_projectionCanonicalProjectionSupportyesCanonical Projection.
conversionConversionSupportEntryyesWhether this format participates in the conversion graph, and by which route.
version_coverageVersionCoverageyesWhich versions of this format are read and written, which one an export produces by default, and where a version is reached through a projection or a downgrade (FMT-3.8). A claim about versions: how completely the format's constructs are modelled is what unsupported_constructs and canonical_projection above answer.
notesarray of stringnoReviewed prose about this format's boundaries, in reading order.
registry_versionstringyesThe registry contract version this entry belongs to.
review_datestringyesWhen this entry's claims were last reviewed.

FormatCapabilitySnapshot​

The full, deterministic registry view exposed to the REST contract + UI (CPDO-2.4).

Derived from the (deterministic) import-source registry and the static seeds, so identical inputs yield an identical snapshot — safe to cache by :attr:version and to mirror in a TypeScript contract.

PropertyTypeRequiredDescription
versionstringyesThe registry contract version (:data:REGISTRY_VERSION).
review_datestringyesWhen the registry's seeds/explanations were reviewed.
analysis_schema_versionstringyesThe payload-analysis contract version this registry's reason mapping pairs with, so a reader can tell the two apart when either moves.
absence_categoriesarray of stringyesThe canonical set of absence-category strings, sorted. Contract tests reject any category outside this set.
absencesarray of AbsenceExplanationyesThe reviewed explanation for each absence category, in vocabulary order.
reason_absence_categoriesmap of stringyesAnalysis reason code → absence category, for every reason code CPDO-1.1 can store.
formatsarray of FormatCapabilityyesOne capability entry per registered import source, in key order.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

ImportSourceListResponse​

The list of registered import sources, for source-card / CLI enumeration.

PropertyTypeRequiredDescription
sourcesarray of ImportSourceDescriptornoEvery registered adapter's descriptor, sorted by key.