Skip to main content

What an import records

Every import stores more than the API itself. With each new version, Apiome records what kind of source it was and how it was read, so the version can be filtered by format, traced back to its source, converted, re-imported or refreshed later — whatever format it came in.

What is recorded​

RecordWhat it holdsExample
FormatThe exact source format the importer recognizedopenapi-3.1, swagger-2.0, protobuf, graphql, asyncapi-3, avro
ProtocolThe kind of API: rest, rpc, event, graph, data_schema or agentrpc for a .proto file
Tool versionsThe toolchain that parsed the source into Apiome's modelOne entry per tool, with its version
Format metadataWhat the import knew about the source beyond the modelSee below

| Original document | The file the import read, after the secret scrub, kept in the document store | See The original document |

Format and protocol are what the Catalog's filters, search across formats and the browse app's Paradigm and Format chips read.

Format metadata​

Format metadata is one open record per version. Each importer adds what its format needs, so a new format never needs a database change. It can hold:

  • Where the source came from — its name or URL, how it arrived (file, URL, pasted, git, connector, live discovery) and, for a repository or connector, the commit or remote revision.
  • Why it landed where it did — the routing reason the Provenance tab shows.
  • The source's fingerprint and, where the source was kept, the source document itself, which conversion and export read back. A source that held credentials is withheld instead, and the record says so.
  • What the secret scrub removed — the kinds and places of redacted values, never the values (Secrets in collections and captures).
  • The import settings of an uploaded file, so a Re-upload… replays them.
  • Format-specific details, such as an EDI dialect profile, FIX message types, a z/OS Connect binding or the REST hypermedia conventions a source declares.

The original document​

Every import keeps the document it read as the version's original, in the document store. This applies to every way in: the import wizards, a file, a URL, pasted text, a repository, a connector, a refresh, the CLI and the REST API.

  • What is kept is the text after the secret scrub. Under an enforcing policy, each credential is replaced before the document is stored. Apiome never stores the unscrubbed upload. See Secrets in collections and captures.
  • A withheld source stays withheld. An archive that held a credential, or a format whose uploads are sensitive (a DICOM file), stores no original. The record says so.
  • An archive is kept as its files. Each file is stored once, with a manifest that lists the files and names the root document.
  • The same document is stored once. Importing an identical document again, into any version of the workspace, reuses the stored object.
  • A version keeps the original of the import that created it. A draft made from an imported version has no original of its own.

Format metadata points to the original under sourceDocument:

FieldHolds
sha256The SHA-256 of the stored object
contentSha256The SHA-256 of the document text. It equals sha256 unless the object is gzip-coded
sizeBytesThe length of the document in bytes
mediaTypeapplication/json, application/yaml, application/xml or text/plain; a manifest for an archive
encodingidentity, or gzip for a large document
partsFor an archive, the number of files

An OpenAPI or Swagger import into a project has no format metadata source. Its original is linked to the version directly, beside the import snapshot that the source workspace reads.

note

Where the document text is also kept in the database depends on the server. With the default db document store, the database still holds the text (sourceContent). With an s3 or filesystem store, it holds the sourceDocument pointer only. Either way, the REST API no longer returns sourceContent in a catalog item's format_metadata. Download the document with GET /v1/catalog/{tenant}/{item}/source, or click "Download raw source" on the item's Source & Code tab.

Where you see it​

On a catalog item's Provenance tab, the four import steps show the records:

StepShowsWhen nothing was recorded
Source intakeWhere the imported document came fromNot recorded
Format detectionThe format and protocol, as pillsNo detected format or protocol was recorded.
NormalizationA chip per tool and its versionTool versions were not recorded for this import.
Catalog recordThe import job that created the item, and who ran it whenNot recorded

Beside them, Toolchain & routing shows the Fingerprint, Publishable, Secret scrub and Routing. See Catalog for the whole item page.

Over the REST API, a catalog item carries its latest revision's sourceFormat, protocol, formatMetadata and toolVersions; see the Catalog REST reference.

Versions from before these records​

Versions that existed before Apiome recorded format and protocol were tagged once, so every filter finds them too:

Older versionFormatProtocol
Its source was kept when it was importedThe imported format (openapi-3.1, swagger-2.0, asyncapi-3, …)That format's protocol
An Arazzo file imported from a repositoryarazzorest
Any other version (built in the designer, the petstore-sample project, older OpenAPI imports)openapirest

Only empty values were filled; nothing an import had recorded was changed. Tool versions and format metadata were not backfilled, so an older item's Normalization step reads Tool versions were not recorded for this import.