anatools.anaclient.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.

Parameters

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

Returns

Information about invitations of an organization.

Return type

list[dict]

get_organization_members(self, organizationId=None)

Get users of an organization.

Parameters

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

Returns

Information about users of an organization.

Return type

list[dict]

get_organizations(self, organizationId=None)

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.