Skip to main content

apiome properties

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

apiome properties​

List, show, fetch, create, update, delete and copy project properties.

apiome properties [OPTIONS] COMMAND [ARGS]...

Subcommands: copy, create, delete, get, list, show, update.

apiome properties copy​

Copy properties to another project of the same tenant (GET, then POST / PUT per property).

A name the destination already has is skipped, unless --update.

Nothing is written if a property refers to a primitive the tenant lacks (exit 7).

--to <tenant>/<project> naming another tenant exits 4. Properties have no tags.

apiome properties copy [OPTIONS] SRC_PROJECT [NAMES]

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesSource project slug or UUID.
NAMES_ARGtextProperty name(s) to copy, comma-separated (or pass --all).

Options

OptionTypeDefaultRequiredDescription
--totextyesDestination project: <project>, or <tenant>/<project> (same tenant).
--allflagCopy every property of the source project.
--renametextName in the destination (one property only).
--updateflagOverwrite a destination property with the same name.
--skip-conflictsflagLeave a destination property with the same name alone (the default).
--dry-runflagShow what would be copied, and the conflicts, without writing.
--yes, -yflagSkip the question --update asks before overwriting.

apiome properties create​

Create a property from a primitive (POST /v1/properties/{tenant}/{project}).

The primitive's JSON Schema is copied in; each example is checked against it locally.

On a terminal, missing fields are asked for. Properties have no tags.

Exit 7, one line per field, when the property is invalid.

apiome properties create [OPTIONS] PROJECT

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.

Options

OptionTypeDefaultRequiredDescription
--nametextProperty name (unique in the project).
--primitivetextPrimitive whose schema the property copies: name, UUID or $id.
--descriptiontextWhat the property holds.
--exampletext (repeatable)An example value (repeatable); read as JSON when it parses, else as text.
--from-filepathJSON or YAML object with name, primitive, description and examples.
--yes, -yflagSkip the final question the prompts ask.

apiome properties delete​

Delete a property once no class uses it (DELETE /v1/properties/{tenant}/{project}/{id}).

In use, it lists the class attributes and exits 6.

--force --yes removes those attributes and deletes it in one server transaction.

A use in a published version refuses even a forced delete (exit 6).

apiome properties delete [OPTIONS] PROJECT PROPERTY

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
PROPERTY_REFtextyesProperty name or UUID.

Options

OptionTypeDefaultRequiredDescription
--yes, -yflagSkip the typed confirmation.
--forceflagRemove it from the classes that use it, then delete it (needs --yes).

apiome properties get​

Fetch one property by id (GET /v1/properties/{tenant_slug}/{project_id}/{id}).

apiome properties get [OPTIONS] PROPERTY_ID

Arguments

ArgumentTypeRequiredDescription
PROPERTY_IDuuidyesProperty UUID.

Options

OptionTypeDefaultRequiredDescription
--project-iduuidyesProject UUID.

apiome properties list​

List a project's properties with their type and the classes that use them (GET /v1/properties/{tenant}/{project}).

Properties have no tags and are not bound to primitives, so the TYPE column is read from each property's JSON Schema (its format, else its type).

apiome properties list [OPTIONS] [PROJECT]

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextProject slug or UUID (or pass --project-id).

Options

OptionTypeDefaultRequiredDescription
--project-iduuidProject UUID (the older form).
--type, --primitivetextOnly properties of this schema type, e.g. string, uuid, date-time, array<string>.
--searchtextCase-insensitive text in the name or description.
--unusedflagOnly properties no class uses.
--limitinteger range50Show at most this many.
--allflagShow every match (ignores --limit).

apiome properties show​

Show one property: its type, constraints, examples, description and the classes that use it.

The name is matched exactly, then ignoring case; a miss suggests the closest names (exit 2). --json prints the full property with usage of {class_name, attribute_name, required}.

apiome properties show [OPTIONS] PROJECT PROPERTY

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
PROPERTY_REFtextyesProperty name or UUID.

apiome properties update​

Change a property's name, description, primitive or examples (PUT /v1/properties/{tenant}/{project}/{id}).

Only changed fields are sent. A concurrent edit since the read (or the file) exits 6.

--primitive is refused (exit 6) while a class requires the property, unless --allow-breaking.

Field problems exit 7. Properties have no tags.

apiome properties update [OPTIONS] PROJECT PROPERTY

Arguments

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject slug or UUID.
PROPERTY_REFtextyesProperty name or UUID.

Options

OptionTypeDefaultRequiredDescription
--nametextRename the property.
--primitivetextRe-copy the schema from this primitive (name, UUID or $id); keeps examples.
--descriptiontextNew description; an empty string clears it.
--add-exampletext (repeatable)Add an example (repeatable).
--remove-exampletext (repeatable)Remove an example (repeatable).
--required-everywhere / --optional-everywhereflag--optional-everywhereMark it required (or optional) on every class attribute using it, in unpublished versions.
--from-filepathApply an edited properties show --json dump (JSON or YAML); exit 6 if it changed since.
--allow-breakingflagChange the primitive even though classes require the property.
--dry-runflagPrint the changes as a diff without sending them.
--yes, -yflagSkip the question --primitive and --required-everywhere ask.