anatools.client.organizations module¶
Organization Functions
- add_organization_member(self, email, role, organizationId=None)¶
Add a user to an existing organization.
- Parameters
email (str) – Email of user to add.
role (str) – Role for user.
organizationId (str) – Organization ID to add members too. Uses current if not specified.
workspaceId (str) – Workspace ID to add members to. Uses current if not specified.
- Returns
Response status if user got added to workspace succesfully.
- Return type
str
- edit_organization(self, name, organizationId=None)¶
Update the organization name. Uses current organization if no organizationId provided.
- Parameters
name (str) – Name to update organization to.
organizationId (str) – Organization Id to update.
- Returns
True if organization was edited successfully, False otherwise.
- Return type
bool
- edit_organization_member(self, email, role, organizationId=None)¶
Edit a member’s role.
- Parameters
email (str) – Member email to edit.
role (str) – Role to assign.
organizationId (str) – Organization ID to remove member from. Edits member in current organization if not specified.
- Returns
Response if member got edited succesfully.
- Return type
str
- get_organization(self)¶
Get organization id of current organization.
- Returns
Organization ID of current workspace.
- Return type
str
- get_organization_limits(self, organizationId=None, setting=None)¶
Get information about Organization limits and setting.
- Parameters
organizationId (str) – Organization ID. Defaults to current if not specified.
setting (str) – Setting name.
- Returns
Organization limit information.
- Return type
json
- get_organization_members(self, organizationId=None)¶
Get users of an organization optionally filtered on workspace.
- Parameters
organizationId (str) – Organization ID. Defaults to current if not specified.
workspaceId (str) – Workspace Id. Optional.
- Returns
json object with users of an organization
- Return type
json
- get_organization_usage(self, organizationId=None, year=None, month=None, workspaceId=None, member=None)¶
Get organization usage optionally filtered on workspace or a user.
- Parameters
organizationId (str) – Organization ID. Defaults to current if not specified.
year (str) – Usage year to filter on.
month (str) – Usage month to filter on.
workspaceId (str) – Workspace Id. Optional.
member (str) – User email. Optional.
- Returns
json object with organization usage by channels, instanceType, and time as integer.
- Return type
json
- get_organizations(self)¶
Shows the organizations the user belongs to and the user’s role in that organization.
- Returns
List of members emails that belong to a workspace.
- Return type
list
- remove_organization_member(self, email, organizationId=None)¶
Remove a member from an existing workspace.
- Parameters
email (str) – Member email to remove.
organizationId (str) – Organization ID to remove member from. Removes from current organization if not specified.
workspaceId (str) – Workspace ID to remove member from. Removes from current workspace if not specified.
- Returns
Response status if member got removed from organization or workspace succesfully.
- Return type
str
- set_organization(self, organizationId, workspaceId=None)¶
Set the organization (and workspace) to the one you wish to work in.
- Parameters
organizationId (str) – Organization ID for the organization you wish to work in.
workspaceId (str) – Workspace ID for the workspace you wish to work in. Uses default workspace if this is not set.
- set_organization_limit(self, setting, limit, organizationId=None)¶
Set Organization limits for a setting.
- Parameters
organizationId (str) – Organization ID. Defaults to current if not specified.
setting (str) – Setting name.
limit (int) – Limit to set at.
- Returns
Organization limit information.
- Return type
json