CLI: Call the Admin API directly
A command to call any Admin API, for operations that have no command. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
Paths and body formats are in the Admin API reference.
| Command | Description |
|---|---|
hakocms-cli api |
Call any Admin API and print the response JSON |
hakocms-cli api
Section titled “hakocms-cli api”Call any Admin API and print the response JSON.
PATH is the part after /admin/api (/spaces/blog/content-types). Exits with 1 if the status is not 2xx. Examples: hakocms-cli api GET /spaces, hakocms-cli api POST /spaces –data ‘{“slug”:“x”,“name”:“X”}’.
hakocms-cli api [OPTIONS] <METHOD> <PATH>| Flag or argument | Description |
|---|---|
<METHOD> |
GET, POST, PUT, PATCH, DELETE |
<PATH> |
The path after /admin/api (may include a query) |
--data <JSON> |
Body (JSON). Use @file to read from a file, - to read from standard input |