Magistrala
Dev GuideCLI

Channels

Manage channels in Magistrala using the CLI.

Channels are Atom resources of kind channel (cli/atom_commands.go's newGraphQLChannelsCmd), the message topic/grouping mechanism devices publish and subscribe through.

Create a channel

magistrala-cli channels create <workspace_id> <name> [--alias <alias>] [--kind <kind>] [--owner-id <id>] [--attributes <json>] --token <token>
magistrala-cli channels create 16a4ad70-a385-45c5-b50a-6d7e48d768d7 "Telemetry Channel" --token $TOKEN

--kind defaults to Atom's standard channel resource kind; override it if your deployment uses a custom resource kind.

List channels in a workspace

magistrala-cli channels list <workspace_id> [--kind <kind>] --token <token>

Leaving --kind empty lists every kind; setting it filters to that kind only.

Get a channel

magistrala-cli channels get <channel_id> --token <token>

There is no update/delete/connect-device operation on this command — only create, list, and get. Manage connections and channel settings through the web UI.

On this page