CLI commands

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>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--automation-idstringYes

Required scope: write.

Example:

koast delete-automation --brand 123 --automation-id AUTOMATION_ID

get-automation

Get automation. GET /v1/brands/{brandId}/automations/{automationId}, API reference.

koast get-automation --brand <brand> --automation-id <automation-id>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--automation-idstringYes

Required scope: read.

Example:

koast get-automation --brand 123 --automation-id AUTOMATION_ID

list-automations

List automations. GET /v1/brands/{brandId}/automations, API reference.

koast list-automations --brand <brand> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--statusstringNo
--cursorstringNoOpaque cursor from the previous page's nextCursor. Omit for the first page.
--limitintegerNoPage 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 123

save-automation

Save automation. POST /v1/brands/{brandId}/automations, API reference.

koast save-automation --brand <brand> --automation <automation> [--json <file|->] [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--automation-idstringNo
--automationJSON objectYesWhole 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.json

With 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|->]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--automation-idstringYes
--statusstringYesOne 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

On this page