Skip to main content

apiome classes

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

apiome classes​

List a version's classes and create new ones.

apiome classes [OPTIONS] COMMAND [ARGS]...

Subcommands: create, list.

apiome classes create​

Create a class in a draft version, with its properties and tags (POST /v1/classes/{tenant}).

On a terminal, missing fields are asked for. Properties must exist, unless --create-missing.

A published or frozen version exits 6; field problems exit 7.

If attaching a property or tag fails, the class is deleted again (exit 1).

apiome classes create [OPTIONS] PROJECT VERSION

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
VERSION_REFtextyesDraft version: label (±v), UUID or tag.

Options

OptionTypeDefaultRequiredDescription
--nametextClass name (unique in the version).
--descriptiontextWhat the class represents.
--tagtext (repeatable)A project tag (repeatable); created if missing.
--propertytext (repeatable)A project property, name or name:required (repeatable).
--from-filepathJSON or YAML class spec: name, description, tags, properties.
--create-missingflagCreate missing properties, asking for each one's primitive (terminal only).
--yes, -yflagSkip the final question the prompts ask.

apiome classes list​

List a version's classes with their property count, tags and description.

--with-properties adds each class's properties (name, type, required), nested ones indented.

--json prints the classes exactly as the API returns them (after the filters and --limit).

apiome classes list [OPTIONS] PROJECT VERSION

Arguments

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

Options

OptionTypeDefaultRequiredDescription
--tagtextOnly classes with this tag (any case).
--searchtextCase-insensitive text in the name or description.
--with-propertiesflagShow every class's properties (one call for the whole version).
--limitinteger range50Show at most this many classes.
--allflagShow every match (ignores --limit).