Skip to main content

How importing works

Importing brings an API that starts outside Apiome into it: a file, a URL, pasted text, a Git repository, or several specs in one archive. Every import follows the same flow. Apiome reads the source, shows you what it found and what will change, and saves nothing until you commit. This page gives an overview of the import system and links to the page with the steps for each part.

The flow​

  1. Choose a source. Start the Import wizard, the CLI or the REST API.

  2. Analyze. Apiome detects the format and decides where the import goes. OpenAPI and Swagger become a project; every other format becomes a catalog item in its original format (Two importers, one registry).

  3. Preview. Before anything is saved, you see what the import holds and what could go wrong:

    • the schemas, operations or types it found,
    • warnings for properties defined differently and references that won't resolve,
    • for a new version of an existing project, the Changes step: what is added, changed, removed and breaking.

    A Dry run answers the same questions and saves nothing.

  4. Commit. The import runs as a job. You can close the wizard and it keeps going.

  5. Record. The new version stores where it came from and how it was read, and keeps the document it was imported from, after the secret scrub, as its original (What an import records). Its import job joins the import history.

If the import fails, nothing is saved. “Undo import” on the Done step of Import specification reverses an import that finished.

While an import waits for your decision​

Import specification writes the whole import first and then asks you to decide. The banner on the Import step reads Transaction pending — changes will only be saved if you accept.

  • “Accept & commit” saves the import. The new project or version appears in Projects at once.
  • “Reject & rollback” discards it. So does closing the dialog.

Until you accept, nobody sees the import: it is not in Projects, in the catalog, in search, in the REST API or on the public site. A new version of an existing project also leaves that project's name, description and details as they were until you accept.

An import waits 60 minutes for your decision. After that it is discarded and nothing is added. The same happens if the Apiome server restarts while the import is waiting. Accept & commit then answers This import is no longer awaiting approval: it expired or was discarded, and nothing was added. Run the import again. Run the import again from the Source step. Whoever runs your Apiome server can change the 60 minutes (Imports waiting for review).

An import that waits does not count toward the projects and versions of your plan. The plan is checked when you accept, so an import can be turned down at that point if the workspace filled up while it waited.

With Incremental mode on, or a Dry run, there is nothing to decide: an incremental import saves each schema as it goes, and a dry run saves nothing.

Where an import can come from​

SourceWhereSteps
A fileFile Upload in either wizardFile Upload
An archive of several specsFile Upload in Import to catalog (.zip, .tar.gz, .tgz, .tar)Import several specs at once
A URLURL Import in either wizardURL Import
Pasted textClipboard Paste in either wizardClipboard Paste
A Git repositoryGit Repository in either wizard, or a connected repositoryGit Repository, Repositories
SwaggerHubSwaggerHub in Import specificationSwaggerHub
A live endpointGraphQL introspection, gRPC server reflection or a FHIR server's /metadata, for a catalog itemKeep a catalog item fresh
An API client collection or traffic captureFile Upload in Import to catalog: Postman, Insomnia, Bruno, Hoppscotch, Thunder Client, .http files or a HAR recordingCollections and captured traffic
An RPC, event or IDL descriptionFile Upload in Import to catalog: OpenRPC, xRegistry, CloudEvents, Thrift, FlatBuffers, Cap'n Proto or Connect RPCRPC and event formats
A healthcare, finance or EDI messageFile Upload in Import to catalog: FHIR, HL7 v2, ISO 20022, FIX, FIX Orchestra, ISO 8583, EDI X12, UN/EDIFACT or UBLHealthcare and finance standards
A legacy, mainframe or middleware contractFile Upload in Import to catalog: COBOL copybooks, z/OS Connect, WADL, CORBA IDL, ASN.1, XML-RPC or ONC RPCLegacy, mainframe and middleware formats
A gateway or platform exportAn exported file, such as an AWS API Gateway export, uploaded as a fileSupported formats

Supported formats lists every format Apiome imports and which importer handles it. Keep imports up to date explains which of these sources Apiome checks again for changes.

Import several specs at once​

An archive or a repository folder often holds more than one API. Import to catalog splits it into independent specs and imports each one separately. Files that belong together, such as a WSDL and the XSDs it imports, stay together as one spec.

  1. On the Catalog, click “Import to catalog”.
  2. Choose File Upload and drop an archive, or choose Git Repository and point Path or glob at a folder.
  3. On Detect & route, a banner says This source holds 3 independent specs. It lists each spec with its format and where it will go (the catalog or a project).
  4. Click “Import all 3”. Each spec runs as its own import job. Its row shows its state and progress. “Progress” or “Summary” opens that spec's job.
  5. When every job has finished, the line at the top says, for example, Bulk import finished: 2 imported, 1 failed of 3. A failed spec shows its reason and does not stop the others.

Files that belong to no spec are listed under … files are part of no spec, each with the reason. One batch imports up to 50 specs by default; a larger archive says that only the first 50 can be imported. If the source changed between the banner and the import, nothing is imported and the panel lists what changed.

From the CLI, apiome import auto --bulk ./apis.zip does the same (apiome import auto).

Import history​

Every import is a job, and the jobs are kept:

  • The wizard's first step lists your three most recent imports with their state. “All import jobs” opens Recent import jobs: every import job with its Job id, State and Progress, a page at a time (Previous / Next).
  • A repository's page shows the imports and sync runs for that repository (A repository's page).
  • A catalog item's Provenance tab shows where each version came from (What an import records).
  • The REST API returns an import job's state and result with GET /v1/tenants/{tenant}/imports/{job}.

Not yet available​

These are planned and not in the product yet:

  • Importing straight from another Apiome workspace. To copy an API between workspaces, export it from one and import the file into the other (Export a spec).

Where next​