Groups¶
A group is a named collection of Tags — used for filtering, bulk operations, and notification routing.
Quick reference¶
| Method | What it does |
|---|---|
client.groups.list() |
All groups in scope. |
client.groups.create(name, **fields) |
Create a group. |
client.groups.update(uid, **fields) |
Update group fields. |
client.groups.delete(uid) |
Delete; detaches all tags first (compound). |
client.groups.add_tags(group_uid, tag_uids) |
Add tags to a group. |
client.groups.remove_tags(group_uid, tag_uids) |
Remove tags from a group. |
client.groups.delete_raw(uid) |
Single REST call — no detach. |
Writing¶
group = client.groups.create(name="Fleet A")
client.groups.add_tags(group.uid, ["t-1", "t-2"])
client.groups.remove_tags(group.uid, ["t-2"])
client.groups.delete(group.uid)
groups.delete is a compound: it first removes the group from every
tag's group list, then deletes the row. groups.delete_raw is the
single-REST-call escape hatch — leaves stale memberships on tags.
Model — Group¶
| Field | Type | Notes |
|---|---|---|
uid |
str |
Server-assigned. |
name |
str \| None |
Display. |
Related entities¶
- Tags:
tags.create(groups=...),tags.replace_groups(...), and the compound members oftags.updatekeep both sides in sync. See Tags. - Notifications: groups are common filter targets for notification profiles. See Notifications.
See also¶
- Compound workflows —
deletecascade discipline.