CLI: Schema applies
Commands to start applying a schema file (a job), check its progress, and get its result. You normally use schema apply instead. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
| Command | Description |
|---|---|
hakocms-cli schema-applies create |
Send a schema file (*.hako.json) and compute the diff against the current space. Nothing is changed yet |
hakocms-cli schema-applies delete |
Delete a schema apply record |
hakocms-cli schema-applies get |
Get one schema apply |
hakocms-cli schema-applies list |
List schema applies |
hakocms-cli schema-applies start |
After checking the diff, start the schema apply |
hakocms-cli schema-applies create
Section titled “hakocms-cli schema-applies create”Send a schema file (*.hako.json) and compute the diff against the current space. Nothing is changed yet.
With –wait, waits until the diff is ready and shows it. If you agree, apply it with schema-applies start
hakocms-cli schema-applies create [OPTIONS] <FILE>| Flag or argument | Description |
|---|---|
<FILE> |
Schema file (- for standard input) |
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--wait |
Wait until the job finishes and print the result. Exits with 1 if it fails |
hakocms-cli schema-applies delete
Section titled “hakocms-cli schema-applies delete”Delete a schema apply record.
Ones that are waiting or running cannot be deleted (409)
hakocms-cli schema-applies delete [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--force |
Do it without asking for confirmation |
hakocms-cli schema-applies get
Section titled “hakocms-cli schema-applies get”Get one schema apply.
hakocms-cli schema-applies get [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
hakocms-cli schema-applies list
Section titled “hakocms-cli schema-applies list”List schema applies.
Returns up to 20 items, newest first.
hakocms-cli schema-applies list [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
hakocms-cli schema-applies start
Section titled “hakocms-cli schema-applies start”After checking the diff, start the schema apply.
Agrees to the diff and starts the schema apply.
Returns 409 in these cases: the diff is not ready yet, the apply has already started, there are changes that cannot be applied even with confirm or prune, there is nothing to apply, or applying would exceed the limit on the number of content types.
When there are changes that cannot be applied, message has one reason per line. When the limit would be exceeded, limit has the limit’s name and value.
hakocms-cli schema-applies start [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--allow-violations[=true|false] |
Apply changes even if existing entries violate them. If omitted, false |
--prune[=true|false] |
Delete content types that are removed (delete), together with their entries. If omitted, false |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |
--wait |
Wait until the job finishes and print the result. Exits with 1 if it fails |