Skip to main content

apiome import

Global options such as --base-url, --tenant and --json go before the command — see CLI reference. Exit codes are listed in Exit codes.

apiome import​

Import OpenAPI, Swagger, Arazzo, JSON Schema, and JSON Schema type documents into Apiome. Any other registered format (see import --list) is importable as import <format> <input>.

apiome import [OPTIONS] COMMAND [ARGS]...

Subcommands: arazzo, auto, git, json-schema, json-schema-type, openapi, preflight, swagger.

Options

OptionTypeDefaultRequiredDescription
--listflagList the registered import sources (formats) and exit.

apiome import arazzo​

Import an Arazzo 1.0 workflow document from a file, URL, or stdin.

apiome import arazzo [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesArazzo document path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--dry-runflagValidate and plan the import without persisting changes.
--project-nametextOverride project name derived from the configured project-name field.
--project-name-fieldtextDot path or JSON Pointer for the field used as the project name (for example info.summary or #/info/summary). Stored as info.x-apiome-project-name-field when omitted from the document.
--versiontextOverride version string derived from info.version.
--project-iduuidUpdate an existing project instead of creating from info.
--project-slugtextOverride project slug derived from info.title (DB slug rules).
--version-iduuidAttach workflows to this existing project version.
--version-slugtextOverride version slug derived from info.version (DB slug rules).
--publishtextPublish the imported project version immediately as public or private (tenant-protected). Omit to leave the version as draft.
--visibilitytextAlias for --publish (accepts public or private).
--wait / --no-waitflag--waitPoll async imports until complete (default: wait).
--poll-intervalfloat range1.0Seconds between GET /imports/{job_id} polls when waiting.

apiome import auto​

Detect document format from headers and run the matching import.

apiome import auto [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesDocument path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--dry-runflagValidate and plan the import without persisting changes.
--project-nametextOverride project name derived from the configured project-name field (OpenAPI/Arazzo).
--project-name-fieldtextDot path or JSON Pointer for the field used as the project name (for example info.summary or #/info/summary). Stored as info.x-apiome-project-name-field when omitted from the document. (OpenAPI/Arazzo).
--versiontextOverride version string derived from info.version (OpenAPI/Arazzo).
--project-iduuidTarget or link project for the import.
--project-slugtextOverride project slug derived from info.title (OpenAPI/Arazzo).
--version-slugtextOverride version slug derived from info.version (OpenAPI/Arazzo).
--version-iduuidAttach Arazzo workflows or JSON Schema to this project version.
--publishtextPublish the imported project version immediately as public or private (tenant-protected). Omit to leave the version as draft. (OpenAPI/Arazzo).
--visibilitytextAlias for --publish (accepts public or private). (OpenAPI/Arazzo).
--asproperty | properties | schemaJSON Schema import target: property, properties, or schema (default: auto-detect).
--nametextProperty, schema, or type name override.
--descriptiontextDescription stored on the imported JSON Schema artifact.
--link-project-propertyflagCreate a project_properties row when --project-id is set.
--wait / --no-waitflag--waitPoll async OpenAPI/Arazzo imports until complete (default: wait).
--poll-intervalfloat range1.0Seconds between GET /imports/{job_id} polls when waiting.
--forceflagWith --publish, bypass publish gates (e.g. classes missing required descriptions, breaking changes) so the version still publishes. (OpenAPI/Arazzo).
--import-timeoutfloat rangeMax seconds to wait for an async import job to finish, and the per-request HTTP timeout used while waiting (default 120). Increase for large specs that take longer than the default to import. Overrides the global --timeout for this import.
--min-gradetextFail when the lint grade is worse than this (A best, F worst). Exits 4 when the threshold is missed.
--fail-ontextFail when the lint report has any finding at or above this severity (error, warning, info). Exits 4 when the threshold is missed.
--bulkflagImport every independent spec in an archive or directory (MFI-29.5): auto-detect each one, group the files that compile together, and start one import per spec. PATH must be a .zip/.tar.gz archive or a directory.
--overridetext (repeatable)Override where one item goes, as KEY=SPEC (repeatable). SPEC is 'new' (create a project), 'existing' (append to the item's matched project), 'existing:PROJECT_ID' (append to that project), and may end in '@VERSION' to name the version created. '@VERSION' alone keeps the plan's choice and only sets the label. Items with no override apply the plan as reviewed. (--bulk only)

apiome import git​

Import a repository path or glob at a ref (MFI-29.3).

The server reads the selection at an immutable commit and packs it as the same multi-file payload an archive upload produces, so the import runs the normal pipeline — pre-flight gate included — and the created revision records which repository, ref, and commit it came from.

apiome import git [OPTIONS] REPO_URL

Arguments

ArgumentTypeRequiredDescription
REPO_URLtextyesRepository URL, for example https://github.com/owner/repo.

Options

OptionTypeDefaultRequiredDescription
--reftextBranch, tag, or commit sha (default: the repository's default branch).
--pathtextPath or glob selecting what to import — a directory (protos/), an exact file, or a glob (**/*.proto). Default: the whole tree.
--roottextRoot document inside the selection, when auto-detection is ambiguous.
--formattextImporter format key (default: the format detected for the root document).
--repository-idtextRegistered repository whose stored credential authorizes a private read.
--linked-account-idtextYour linked account whose stored credential authorizes a private read.
--dry-runflagValidate and preview the import without persisting changes.
--import-timeoutfloat rangeMax seconds to wait for an async import job to finish, and the per-request HTTP timeout used while waiting (default 120). Increase for large specs that take longer than the default to import. Overrides the global --timeout for this import.
--wait / --no-waitflag--waitPoll the import until complete (default: wait).
--poll-intervalfloat range1.0Seconds between import job-status polls when waiting.
--min-gradetextFail when the lint grade is worse than this (A best, F worst). Exits 4 when the threshold is missed.
--fail-ontextFail when the lint report has any finding at or above this severity (error, warning, info). Exits 4 when the threshold is missed.

apiome import json-schema​

Import a JSON Schema 2020-12 document from a file, URL, or stdin.

apiome import json-schema [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesJSON Schema path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--asproperty | properties | schemaImport as property, properties (all $defs entries), or schema (default: auto-detect).
--nametextProperty or schema name when not inferred from the file.
--descriptiontextDescription stored on the property or schema.
--project-iduuidLink the import to this project (project_properties when requested).
--version-iduuidLink a schema import to this project version.
--link-project-propertyflagCreate a project_properties row when --project-id is set.
--dry-runflagValidate and plan the import without persisting changes.

apiome import json-schema-type​

Import system-wide JSON Schema type definitions from a file, URL, or stdin.

apiome import json-schema-type [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesJSON Schema type library path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--dry-runflagValidate and plan the import without persisting changes.
--nametextOverride inferred type name (single-type imports only).
--descriptiontextOverride description stored on the type (single-type imports only).
--publishtextPublish imported types to the system-wide library as public, or import private to the caller's tenant only. Omit to default to tenant scope.
--visibilitytextAlias for --publish (accepts public or private).

apiome import openapi​

Import an OpenAPI document from a file, URL, or stdin.

apiome import openapi [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesOpenAPI document path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--dry-runflagValidate and plan the import without persisting changes.
--project-nametextOverride project name derived from the configured project-name field.
--project-name-fieldtextDot path or JSON Pointer for the field used as the project name (for example info.summary or #/info/summary). Stored as info.x-apiome-project-name-field when omitted from the document.
--versiontextOverride version string derived from info.version.
--project-iduuidUpdate an existing project instead of creating from info.
--project-slugtextOverride project slug derived from info.title (DB slug rules).
--version-slugtextOverride version slug derived from info.version (DB slug rules).
--publishtextPublish the imported project version immediately as public or private (tenant-protected). Omit to leave the version as draft.
--visibilitytextAlias for --publish (accepts public or private).
--wait / --no-waitflag--waitPoll async imports until complete (default: wait).
--poll-intervalfloat range1.0Seconds between GET /imports/{job_id} polls when waiting.
--forceflagWith --publish, bypass publish gates (e.g. classes missing required descriptions, breaking changes) so the version still publishes.
--import-timeoutfloat rangeMax seconds to wait for an async import job to finish, and the per-request HTTP timeout used while waiting (default 120). Increase for large specs that take longer than the default to import. Overrides the global --timeout for this import.
--min-gradetextFail when the lint grade is worse than this (A best, F worst). Exits 4 when the threshold is missed.
--fail-ontextFail when the lint report has any finding at or above this severity (error, warning, info). Exits 4 when the threshold is missed.

apiome import preflight​

Score a candidate document before importing it — lint grade, ranked findings, and the tenant quality-policy verdict. Nothing is persisted and no import job is created. Gate exit codes: 3 = tenant quality policy blocked, 4 = --min-grade/--fail-on threshold missed, 5 = nothing gradable (candidate unimportable / no usable target). These are distinct from transport (1) and usage/auth (2) failures.

apiome import preflight [OPTIONS] [INPUT]

Arguments

ArgumentTypeRequiredDescription
SOURCEtextDocument path, http/https URL, or '-' for stdin.

Options

OptionTypeDefaultRequiredDescription
--filetextLocal document path to import (alternative to the INPUT argument).
--urltexthttp/https document URL to import (alternative to the INPUT argument).
--formattextRegistry key of the adapter to score against (source_kind). Omit to auto-detect; the detection verdict is reported either way.
--roottextRoot document path inside a .zip/.tar.gz archive (MFI-29.1).
--targettextDestination a commit would request: catalog, types, or project. Consulted only for JSON Schema, exactly as on the import job.
--min-gradetextFail when the lint grade is worse than this (A best, F worst). Exits 4 when the threshold is missed.
--fail-ontextFail when the lint report has any finding at or above this severity (error, warning, info). Exits 4 when the threshold is missed.

apiome import swagger​

Import a Swagger 2.0 document from a file, URL, or stdin.

apiome import swagger [OPTIONS] PATH

Arguments

ArgumentTypeRequiredDescription
PATHtextyesSwagger 2.0 document path (.json, .yaml, .yml), http/https URL, or - for stdin.

Options

OptionTypeDefaultRequiredDescription
--dry-runflagValidate and plan the import without persisting changes.
--project-nametextOverride project name derived from the configured project-name field.
--project-name-fieldtextDot path or JSON Pointer for the field used as the project name (for example info.summary or #/info/summary). Stored as info.x-apiome-project-name-field when omitted from the document.
--versiontextOverride version string derived from info.version.
--project-iduuidUpdate an existing project instead of creating from info.
--project-slugtextOverride project slug derived from info.title (DB slug rules).
--version-slugtextOverride version slug derived from info.version (DB slug rules).
--publishtextPublish the imported project version immediately as public or private (tenant-protected). Omit to leave the version as draft.
--visibilitytextAlias for --publish (accepts public or private).
--wait / --no-waitflag--waitPoll async imports until complete (default: wait).
--poll-intervalfloat range1.0Seconds between GET /imports/{job_id} polls when waiting.
--forceflagWith --publish, bypass publish gates (e.g. classes missing required descriptions, breaking changes) so the version still publishes.
--import-timeoutfloat rangeMax seconds to wait for an async import job to finish, and the per-request HTTP timeout used while waiting (default 120). Increase for large specs that take longer than the default to import. Overrides the global --timeout for this import.
--min-gradetextFail when the lint grade is worse than this (A best, F worst). Exits 4 when the threshold is missed.
--fail-ontextFail when the lint report has any finding at or above this severity (error, warning, info). Exits 4 when the threshold is missed.