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.

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_invites(self, organizationId=None)

Get invitations of an organization optionally filtered on workspace.

Parameters

organizationId (str) – Organization ID. Defaults to current if not specified.

Returns

Information about invitations of an organization.

Return type

list[dict]

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

list[dict]

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.

Returns

Information about users of an organization.

Return type

list[dict]

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

Organization usage by channels, instanceType, and time as integer.

Return type

list[dict]

get_organizations(self)

Shows the organizations the user belongs to and the user’s role in that organization.

Returns

Information about the organizations you belong to.

Return type

list[dict]

remove_organization_invitation(self, email, organizationId=None, invitationId=None)

Remove a invitation from an existing organization.

Parameters
  • email (str) – Invitation email to remove.

  • organizationId (str) – Organization ID to remove member from. Removes from current organization if not specified.

  • invitationId (str) – Invitation ID to remove invitation from. Removes from current organization if not specified.

Returns

Response status if member got removed from organization succesfully.

Return type

str

remove_organization_member(self, email, organizationId=None)

Remove a member from an existing organization.

Parameters
  • email (str) – Member email to remove.

  • organizationId (str) – Organization ID to remove member from. Removes from current organization if not specified.

Returns

Response status if member got removed from organization succesfully.

Return type

str

set_organization(self, organizationId, workspaceId=None)

Set the organization (and optionally a 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 limit for a setting.

Parameters
  • setting (str) – Setting name.

  • limit (int) – Limit for the setting.

  • organizationId (str) – Organization ID. Defaults to current if not specified.

Returns

Organization limit information.

Return type

list[dict]