Automations commands
The 5 koast CLI commands for the Automations operations.
Every command is one API operation, named by its operationId. Global flags such as --output and --api-url work on all of them, see CLI commands.
delete-automation
Delete automation. DELETE /v1/brands/{brandId}/automations/{automationId}, API reference.
koast delete-automation --brand <brand> --automation-id <automation-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--automation-id | string | Yes |
Required scope: write.
Example:
koast delete-automation --brand 123 --automation-id AUTOMATION_IDget-automation
Get automation. GET /v1/brands/{brandId}/automations/{automationId}, API reference.
koast get-automation --brand <brand> --automation-id <automation-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--automation-id | string | Yes |
Required scope: read.
Example:
koast get-automation --brand 123 --automation-id AUTOMATION_IDlist-automations
List automations. GET /v1/brands/{brandId}/automations, API reference.
koast list-automations --brand <brand> [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--status | string | No | |
--cursor | string | No | Opaque cursor from the previous page's nextCursor. Omit for the first page. |
--limit | integer | No | Page size. Default 50. Minimum 1, maximum 100. |
Required scope: read. Paged. --all follows nextCursor to the end and prints one JSON line per item.
Example:
koast list-automations --brand 123save-automation
Save automation. POST /v1/brands/{brandId}/automations, API reference.
koast save-automation --brand <brand> --automation <automation> [--json <file|->] [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--automation-id | string | No | |
--automation | JSON object | Yes | Whole monitoring automation spec: { name, actionLevel, actions[], frequency, apiOutageAction, rules[], campaignIds?, status?, applyToNewCampaigns? } |
Required scope: write. Accepts --idempotency-key. The CLI sends a key only when you give one. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast save-automation --brand 123 --json body.jsonWith body.json:
{
"automationId": "string",
"automation": {}
}set-automation-status
Set automation status. PATCH /v1/brands/{brandId}/automations/{automationId}/status, API reference.
koast set-automation-status --brand <brand> --automation-id <automation-id> --status <status> [--json <file|->]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--automation-id | string | Yes | |
--status | string | Yes | One of ACTIVE, PAUSED. |
Required scope: write. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast set-automation-status --brand 123 --automation-id AUTOMATION_ID --status ACTIVE