Dev GuideCLI
Groups
Manage groups in Magistrala using the CLI.
Groups are a logical grouping of devices, channels, or other groups, used to simplify access control (cli/atom_commands.go's newGraphQLGroupsCmd).
Create a group
magistrala-cli groups create <workspace_id> <name> [--type object|principal] [--description <text>] [--attributes <json>] --token <token>magistrala-cli groups create 16a4ad70-a385-45c5-b50a-6d7e48d768d7 "Building A Sensors" --type object --token $TOKEN--type defaults to object. Atom distinguishes object groups (grouping devices/channels/other resources — the common case) from principal groups (grouping users/identities for access-control purposes); pick the one that matches what you're grouping.
List groups in a workspace
magistrala-cli groups list <workspace_id> --token <token>Get a group
magistrala-cli groups get <group_id> --token <token>There is no update/delete/membership-management operation on this command in the current
CLI — only create, list, and get. Manage group membership and hierarchy through the web
UI until (or unless) an equivalent CLI operation exists.