Skip to main content

apiome versions

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

apiome versions​

List, show, create, publish, fork, compare and delete versions.

apiome versions [OPTIONS] COMMAND [ARGS]...

Subcommands: compatibility, create, delete, fork, freeze, get, list, original, publish, show, unpublish.

apiome versions compatibility​

Check two versions for breaking changes — a CI gate (POST /v1/versions/{tenant}/{project}/compatibility).

Exit codes: 0 no unsuppressed breaking change, 6 at least one, 8 the server could not be reached or failed fetching either side, 2 a bad argument or reference.

apiome versions compatibility [OPTIONS] PROJECT

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.

Options

OptionTypeDefaultRequiredDescription
--basetextOlder version: label (2.0.0 or v2.0.0), revision UUID or tag. Default: the most recent published version before --head.
--headtextNewer version: label, revision UUID or tag. Default: the latest version.
--severitytextinfoShow findings at this level or above: error, warn or info (default).
--allow-removalsflagTreat breaking removals as warnings, so they do not fail the gate.
--ignoretext (repeatable)Rule id to skip, e.g. path_removed (repeat, or comma-separate). removed-path spelling is accepted.
--sarifflagPrint SARIF 2.1.0 (for GitHub code scanning) instead of the table.

apiome versions create​

Create a draft version (POST /v1/versions/{tenant}/{project}).

The new version is always a draft; publish it with apiome versions publish. Its classes are copied from --base (default: the latest published version), unless --empty. The command looks up the project's head itself, so the push is accepted only if nobody advanced it meanwhile.

Exit codes: 0 created, 6 the version already exists, 2 a bad argument, 1 the server refused it (including a head that moved during the call — re-run).

apiome versions create [OPTIONS] PROJECT

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.

Options

OptionTypeDefaultRequiredDescription
--versiontextyesNew version label, e.g. 1.2.0 (MAJOR.MINOR.PATCH).
--notestextShort revision note.
--notes-filepathUTF-8 markdown file used as the version's changelog (instead of --notes).
--basetextVersion to copy classes from: label, revision UUID or tag. Default: the latest published version.
--emptyflagStart the draft with no classes (do not copy from a base).
--copy-pathsflagAlso copy the base version's paths.
--branchtextBranch to advance; required when the project has several branches.
--from-filepathJSON file holding a full request body; the flags above override its fields.

apiome versions delete​

Delete a version, after typing it to confirm (DELETE /v1/versions/{tenant}/{project}/{version_record_id}).

Meant for drafts. A published or frozen version is refused unless --force, which unpublishes (with --reason) and unfreezes it first. Version tags pointing at it stop the delete unless --detach-tags or --force removes them.

apiome versions delete [OPTIONS] PROJECT VERSION

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
VERSION_REFtextyesVersion label (2.2.0 or v2.2.0), revision UUID or version tag.

Options

OptionTypeDefaultRequiredDescription
--detach-tagsflagRemove the version tags pointing at it first.
--forceflagDelete a published or frozen version: unpublish and unfreeze it first, and remove its tags.
--reasontextUnpublish reason, required with --force on a published version.
--yes, -yflagSkip the typed confirmation.

apiome versions fork​

Fork a version into another project, keeping its lineage (POST /v1/versions/{tenant}/{target}/fork).

Copies the source version's classes and their properties into a new draft version of the target project, recorded as a fork so it can merge back later. Paths are not copied. Within one project, use a branch instead: the server refuses a same-project fork.

apiome versions fork [OPTIONS] PROJECT_REF SOURCE_REF

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesSource project slug or UUID.
SOURCE_REFtextyesSource version: label (2.1.0 or v2.1.0), revision UUID, or version tag.

Options

OptionTypeDefaultRequiredDescription
--intotextyesTarget project (slug or UUID) the fork is created in.
--totextyesNew version label in the target, e.g. 3.0.0.
--notestextShort revision note.
--notes-filepathMarkdown file used as the new version's changelog.
--include-tagsflagAlso create the source's version tags on the fork.
--allow-lesserflagAllow --to to be lower than or equal to the source.
--dry-runflagShow what would be copied without forking.

apiome versions freeze​

Freeze a published version's OpenAPI document byte-for-byte (POST …/{version_record_id}/freeze-schema).

Shows the snapshot's class, property and path counts, SHA-256 and size, then asks before freezing. While frozen, /v1/schema/{tenant}/{project}/{version} serves exactly those bytes, whatever later happens to the version's classes. --unfreeze removes the snapshot.

apiome versions freeze [OPTIONS] PROJECT VERSION

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
VERSION_REFtextyesPublished version label (2.1.0 or v2.1.0) or revision UUID.

Options

OptionTypeDefaultRequiredDescription
--unfreezeflagRemove the snapshot; refused once it has been downloaded.
--force-unfreezeflagUnfreeze even though the snapshot has been downloaded (tenant administrators only).
--yes, -yflagSkip the confirmation.

apiome versions get​

Fetch one version (GET /v1/versions/{tenant_slug}/{project_id}/{version_id}).

apiome versions get [OPTIONS] VERSION_ID

Arguments

ArgumentTypeRequiredDescription
VERSION_IDuuidyesVersion record UUID.

Options

OptionTypeDefaultRequiredDescription
--project-iduuidyesParent project UUID.

apiome versions list​

List project versions (GET /v1/versions/{tenant_slug}/{project_id}).

apiome versions list [OPTIONS]

Options

OptionTypeDefaultRequiredDescription
--project-iduuidRestrict results to one project (required unless listing all projects).

apiome versions original​

Download the file a version was imported from (GET …/{version_record_id}/original).

The bytes are exactly what the import stored (after the tenant's secret scrub) and are checked against the server's SHA-256 before anything is written. For a version imported from a set of files the original is the set's JSON manifest; --part downloads one of its files. With --json and -o, prints {file, filename, sha256, sizeBytes, mediaType}.

apiome versions original [OPTIONS] PROJECT VERSION

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
VERSION_REFtextyesVersion label (2.1.0 or v2.1.0) or revision UUID.

Options

OptionTypeDefaultRequiredDescription
--output, -opathWrite to this file (or, for a directory, under the original file name). Default: stdout.
--parttextFor a version imported from a set of files: the file to download, by its path in the set.

apiome versions publish​

Publish a version (POST …/{version_record_id}/publish).

apiome versions publish [OPTIONS] VERSION

Arguments

ArgumentTypeRequiredDescription
VERSIONtextyesVersion UUID, or a slug/label when --project is supplied.

Options

OptionTypeDefaultRequiredDescription
--projecttextyesProject UUID or slug.
--visibility, -vtextpublicPublish visibility: 'public' (catalog) or 'private' (tenant-protected).

apiome versions show​

Show one version: state, dates, notes, tags, what changed, compatibility and spec URLs.

Classes and paths are counted, with what was added, removed and modified against the previous version (the most recent published version before it). The compatibility summary comes from POST /v1/versions/{tenant}/{project}/compatibility and is skipped when there is no previous version. --json returns the version record plus compatibility_summary and spec_urls.

apiome versions show [OPTIONS] PROJECT VERSION

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
VERSION_REFtextyesVersion label (2.1.0 or v2.1.0), revision UUID, or version tag (stable, latest).

apiome versions unpublish​

Unpublish a version: return it to draft and move its tags back (POST …/{version_record_id}/unpublish).

Shows what will happen — the spec endpoints it disappears from, the version tags that move to the next-most-recent published version, the webhook subscribers notified — then asks you to type the version to confirm. The reason is stored and shown by versions get.

apiome versions unpublish [OPTIONS] PROJECT [VERSION]

Arguments

ArgumentTypeRequiredDescription
FIRSTtextyesProject slug or UUID (or the version, when --project is passed).
SECONDtextVersion label (2.1.0 or v2.1.0) or revision UUID.

Options

OptionTypeDefaultRequiredDescription
--projecttextProject UUID or slug; the older form unpublish <version> --project <project>.
--reasontextWhy it is unpublished; recorded for audit. Required unless --silent.
--keep-tagsflagLeave version tags on it instead of moving them to the previous published version.
--silentflagDo not notify webhook subscribers (tenant administrators only).
--forceflagUnpublish even when it is the project's only published version.
--yes, -yflagSkip the typed confirmation.