Groups¶
groups ¶
Groups resource group.
Wraps three Groups endpoints:
GET /v1/compliance/groups— offset-paginated list of groups.GET /v1/compliance/groups/{group_id}— single group fetch.GET /v1/compliance/groups/{group_id}/members— offset-paginated list of users in the group.
Unlike roles, groups are not addressed under an organisation
path — they're top-level. The roles each group grants travel inline
on roles as a list of role IDs.
Group
dataclass
¶
A user group defined inside an organisation.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Tagged group identifier. |
name |
str
|
Display name. |
description |
str
|
Free-form description. |
source_type |
str
|
How the group was created — |
created_at |
str | None
|
ISO 8601 creation timestamp, or |
updated_at |
str | None
|
ISO 8601 last-update timestamp, or |
roles |
list[str] | None
|
IDs of roles assigned to the group, or |
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build a Group from one decoded record.
GroupMember
dataclass
¶
A user's membership in a group.
Attributes:
| Name | Type | Description |
|---|---|---|
user_id |
str
|
Tagged user identifier. |
email |
str
|
Member email address at the time of the request. |
created_at |
str | None
|
ISO 8601 membership creation timestamp, or
|
updated_at |
str | None
|
ISO 8601 membership last-update timestamp, or
|
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build a GroupMember from one decoded record.
Groups ¶
Synchronous client for the Groups endpoints.
list ¶
Fetch one offset-paginated page of groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int | None
|
Maximum results per page (default 500, max 1000). |
None
|
page
|
str | None
|
Opaque pagination token from a prior response. |
None
|
list_members ¶
list_members(
group_id: str,
*,
limit: int | None = None,
page: str | None = None
) -> OffsetPage[GroupMember]
Fetch one offset-paginated page of members for a group.
iter_members ¶
Iterate every member of a group, auto-paginating.