Skip to main content

Campaign

Campaign commands manage large-scale rollouts to fleets of devices. A campaign defines:

  • a device set — the devices the campaign targets, selected explicitly by device ID or by a SQL-like filter query
  • a device configuration — the configuration (e.g., container set) applied to each device
  • a strategy — how the rollout proceeds (batch size, pacing, validation, etc.)

You create a campaign, attach devices and a configuration to it, optionally validate, then start the rollout. While a campaign is running you can pause, resume, or cancel it; you can also add or remove devices on the fly.

The campaign resource has aliases campaign and campaigns. Most subcommands take a CAMPAIGN_ID as a positional argument; you can avoid passing it on every call by setting a default with campaign set-id.

For full flag details on any subcommand, run atymctl campaign <subcommand> --help.


Lifecycle

SubcommandPurpose
campaign createCreate a new campaign
campaign getGet campaign details
campaign listList all campaigns for the current tenant
campaign startStart a campaign
campaign pausePause campaign orchestration
campaign resumeResume a paused campaign
campaign cancelCancel a campaign
campaign set-idSet the default campaign ID in your config

Devices

SubcommandPurpose
campaign add-devicesAdd devices to a campaign by ID list or filter
campaign remove-devicesRemove devices from a campaign by ID list or filter
campaign remove-all-devicesRemove all devices from a campaign
campaign remove-statusGet the device removal status for a campaign
campaign search-devicesSearch the devices in a campaign

Configuration

SubcommandPurpose
campaign set-device-configUpdate the device configuration for a campaign
campaign get-device-composeGet the campaign's device compose configuration
campaign get-device-configsGet distinct device configurations in a campaign
campaign validate-composeValidate the campaign's device compose configuration

Strategy

SubcommandPurpose
campaign set-strategyUpdate a campaign's strategy configuration
campaign get-strategyGet a campaign's strategy configuration
campaign list-strategiesList available campaign strategies
campaign validate-strategyValidate a strategy configuration without creating a campaign

Lifecycle Commands

campaign create

Create a new campaign and start copying devices.

Usage:
atymctl campaign create [flags]

Flags:
-d, --description string Campaign description
-h, --help help for create
-n, --name string Campaign name
-s, --save Save the new campaign ID as the default in config

campaign get

Get the details of a campaign.

Usage:
atymctl campaign get CAMPAIGN_ID [flags]

campaign list

List all campaigns for the current tenant.

Usage:
atymctl campaign list [flags]

Flags:
-l, --limit int Pagination limit (default 20)
-o, --offset int Pagination offset

campaign start

Start a campaign. By default the campaign is validated before starting.

Usage:
atymctl campaign start CAMPAIGN_ID [flags]

Flags:
-v, --validate Validate campaign before starting (default true)

campaign pause

Pause campaign orchestration without losing campaign state.

Usage:
atymctl campaign pause CAMPAIGN_ID [flags]

campaign resume

Resume a paused campaign.

Usage:
atymctl campaign resume CAMPAIGN_ID [flags]

campaign cancel

Cancel a campaign. A cancelled campaign cannot be resumed.

Usage:
atymctl campaign cancel CAMPAIGN_ID [flags]

campaign set-id

Verifies the campaign exists and saves its ID as the default in the local config so subsequent campaign commands can omit CAMPAIGN_ID.

Usage:
atymctl campaign set-id CAMPAIGN_ID [flags]

Device Commands

campaign add-devices

Add devices to a campaign by ID list or filter query. Provide one of --device-ids, --device-filter, or --file.

Usage:
atymctl campaign add-devices CAMPAIGN_ID [flags]

Flags:
-F, --device-filter string Device filter as a SQL-like query string (e.g. "enabled = true AND cpu = 'cortex-m7'")
-i, --device-ids string Comma-separated list of device IDs to add
-f, --file string Path to a JSON file containing the full request body

campaign remove-devices

Remove devices from a campaign by ID list or filter query. Provide one of --device-ids, --device-filter, or --file.

Usage:
atymctl campaign remove-devices CAMPAIGN_ID [flags]

Flags:
-F, --device-filter string Device filter as a SQL-like query string
-i, --device-ids string Comma-separated list of device IDs to remove
-f, --file string Path to a JSON file containing the full request body

campaign remove-all-devices

Remove all devices from a campaign.

Usage:
atymctl campaign remove-all-devices CAMPAIGN_ID [flags]

campaign remove-status

Get the device removal status for a campaign. Useful for tracking progress when removing devices from a large fleet.

Usage:
atymctl campaign remove-status CAMPAIGN_ID [flags]

campaign search-devices

Return a filtered, paginated list of devices in a campaign.

Usage:
atymctl campaign search-devices CAMPAIGN_ID [flags]

Flags:
-f, --filter string Filter expression
-l, --limit int Pagination limit (default 20)
-o, --offset int Pagination offset

Configuration Commands

campaign set-device-config

Update the device configuration for a campaign. Provide the config inline with --config (JSON or YAML string) or via --file (.json, .yaml, .yml, or - for stdin).

Usage:
atymctl campaign set-device-config CAMPAIGN_ID [flags]

Flags:
-c, --config string Device configuration as JSON or YAML string
-f, --file string Path to device config file (.json, .yaml, .yml, or - for stdin)

campaign get-device-compose

Get the campaign's device compose configuration.

Usage:
atymctl campaign get-device-compose CAMPAIGN_ID [flags]

campaign get-device-configs

Get the distinct device configurations in a campaign — useful when devices in the campaign have different configurations applied.

Usage:
atymctl campaign get-device-configs CAMPAIGN_ID [flags]

campaign validate-compose

Validate the campaign's device compose configuration.

Usage:
atymctl campaign validate-compose CAMPAIGN_ID [flags]

Strategy Commands

campaign set-strategy

Update a campaign's strategy configuration before the campaign is started.

Usage:
atymctl campaign set-strategy CAMPAIGN_ID [flags]

Flags:
-c, --config string Strategy configuration as JSON or YAML string
-f, --file string Path to strategy config file (.json, .yaml, .yml, or - for stdin)

campaign get-strategy

Get a campaign's current strategy configuration.

Usage:
atymctl campaign get-strategy CAMPAIGN_ID [flags]

campaign list-strategies

List the strategies available for campaigns.

Usage:
atymctl campaign list-strategies [flags]

campaign validate-strategy

Validate a strategy configuration without creating a campaign. Useful for testing strategy configs before committing them.

Usage:
atymctl campaign validate-strategy [flags]

Flags:
-c, --config string Strategy configuration as JSON or YAML string
-f, --file string Path to strategy config file (.json, .yaml, .yml, or - for stdin)
-s, --strategy-id int Strategy ID to validate against