Organizations¶
organizations ¶
Organizations resource group.
Wraps two Compliance API endpoints:
GET /v1/compliance/organizations— offset paginated list of every organisation under the parent organisation. Exposed vialist(one page) anditer(auto-paginate).GET /v1/compliance/organizations/{org_uuid}/users— offset paginated list of users in a given organisation. Exposed vialist_users(one page) anditer_users(auto-paginate).GET /v1/compliance/organizations/{organization_id}/settings— the settings actually in force for one organisation. Exposed viaget_settings.
Example
Organization
dataclass
¶
A single organisation under the parent organisation.
Attributes:
| Name | Type | Description |
|---|---|---|
uuid |
str
|
Stable UUID identifier (used as the path segment for
|
name |
str
|
Human-readable organisation name. |
created_at |
str
|
RFC 3339 creation timestamp. |
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build an Organization from one decoded record.
User
dataclass
¶
A user member of an organisation.
Custom RBAC role and group memberships are not part of this
payload — they come from the Roles and Groups resources.
organization_role is a separate axis: the built-in membership
level within this organisation.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Tagged user identifier ( |
full_name |
str
|
Current display name. |
email |
str
|
Current email address. |
created_at |
str
|
RFC 3339 account creation timestamp. |
organization_role |
str | None
|
Built-in membership level — one of
|
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build a User from one decoded record.
OrganizationSettings
dataclass
¶
The settings in force for one organisation.
This is the enforced state after regulatory restrictions, feature availability, organisation-type defaults, and inter-feature dependencies are applied, which can differ from what an administrator configured. It reflects the state at read time; nothing is snapshotted.
A setting the organisation's administrators cannot change is
omitted from settings. Treat a missing row as "not
controllable here", not as "off" — that distinction is the
easiest thing to get wrong about this endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
organization_id |
str
|
The organisation's bare UUID. Note this is
not the |
settings |
list[dict[str, Any]]
|
Typed setting rows, each a raw dict of |
api_keys |
list[ComplianceApiKey]
|
Every Compliance Access Key configured for the parent organisation. The same list comes back whichever linked organisation you query. |
type |
str
|
Always |
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build an OrganizationSettings from one decoded record.
ComplianceApiKey
dataclass
¶
One Compliance Access Key configured for the parent organisation.
The secret value is never returned. Deactivated keys are included
with is_active false so you can audit what previously had
access.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Key identifier ( |
name |
str
|
Name given to the key at creation. |
scopes |
StrList
|
Scopes granted to the key. Keys carrying only the
retired |
is_active |
bool
|
Whether the key can currently authenticate. |
created_at |
str
|
RFC 3339 creation timestamp. |
created_by_id |
str | None
|
The user who created the key, or |
expires_at |
str | None
|
When the key stops authenticating, or |
type |
str
|
Always |
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build a ComplianceApiKey from one decoded record.
Organizations ¶
Synchronous client for the Organizations endpoints.
list ¶
Fetch one offset-paginated page of organisations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int | None
|
Maximum results per page (default 1000, max 1000). |
None
|
page
|
str | None
|
Opaque pagination token from a prior response's
|
None
|
Returns:
| Type | Description |
|---|---|
OffsetPage[Organization]
|
One |
OffsetPage[Organization]
|
|
Raises:
| Type | Description |
|---|---|
InsufficientScopeError
|
When the API key lacks
|
APIError
|
For any other non-2xx response. |
iter ¶
Iterate every organisation under the parent, auto-paginating.
Same arguments as list except that page is managed by the
iterator and therefore not accepted here.
get_settings ¶
Fetch the settings in force for one linked organisation.
Use this to attest that retention windows, content redaction, SSO enforcement, the IP allowlist, and session-duration controls match your documented baseline, without needing administrator Console access.
Requires read:compliance_org_data. The separate
read:compliance_org_settings scope was retired on
2026-06-30, so a key created before then that carries only the
old scope gets a 403 here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_id
|
str
|
The organisation's bare UUID, as returned
in |
required |
Returns:
| Type | Description |
|---|---|
OrganizationSettings
|
An |
OrganizationSettings
|
Remember that a missing setting row means "administrators |
OrganizationSettings
|
here cannot change it", not "off". |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
When the organisation is not one of your parent's linked organisations, the value is not a valid UUID, or the settings endpoint is not yet enabled for your parent organisation. These three deliberately share one response, so a 404 does not prove the organisation does not exist. |
InsufficientScopeError
|
When the key lacks
|
APIError
|
For any other non-2xx response. |
list_users ¶
list_users(
org_uuid: str,
*,
limit: int | None = None,
page: str | None = None
) -> OffsetPage[User]
Fetch one offset-paginated page of users for an organisation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
org_uuid
|
str
|
Organisation UUID, from |
required |
limit
|
int | None
|
Maximum results per page (default 500, max 1000). |
None
|
page
|
str | None
|
Opaque pagination token from a prior response's
|
None
|
Returns:
| Type | Description |
|---|---|
OffsetPage[User]
|
One |
iter_users ¶
Iterate every user in an organisation, auto-paginating.
Same filters as list_users except that page is
managed by the iterator and therefore not accepted here.
AsyncOrganizations ¶
Asynchronous client for the Organizations endpoints.