anatools.client.workspaces module

Workspace Functions

add_workspace_guest(self, email, workspaceId=None)

Add a guest to an existing workspace.

Parameters
  • email (str) – Email of guest to add.

  • workspaceId (str) – Workspace ID to add a guest to. Uses current if not specified.

Returns

Response status if guest got added to workspace succesfully.

Return type

str

create_workspace(self, name, channelIds=[])

Create a new workspace with specific channels.

Parameters
  • name (str) – New workspace name.

  • channels (list[str]) – List of channel names to add to workspace.

Returns

Workspace ID if creation was successful. Otherwise returns message.

Return type

str

delete_workspace(self, workspaceId=None, prompt=True)

Delete an existing workspace.

Parameters
  • workspaceId (str) – Workspace ID for workspace to get deleted. Deletes current workspace if not specified.

  • prompt (bool) – Set to True if avoiding prompts for deleting workspace.

Returns

Success or failure message if workspace was sucessfully removed.

Return type

str

edit_workspace(self, name=None, channels=None, workspaceId=None)

Edit workspace information. Provided channels list will result in the workspace having those channels. If channels is not provided, then no change will occur.

Parameters
  • name (str) – New name to replace old one.

  • channels (list[str]) – Names of channels that the workspace will have access to.

  • workspaceId (str) – Workspace ID for workspace to update.

Returns

Success or failure message if workspace was sucessfully updated.

Return type

str

get_workspace(self)

Get Workspace ID of current workspace.

Returns

Workspace ID of current workspace.

Return type

str

get_workspace_guests(self, workspaceId=None)

Get guests of a workspace. Uses default workspace if not specified.

Parameters

workspaceId (str) – Workspace Id. Optional.

Returns

Information about guests of an workspace.

Return type

list[dict]

get_workspace_invites(self, workspaceId=None)

Get invitations of a workspace. Uses default workspace if not specified.

Parameters

workspaceId (str) – Workspace Id. Optional.

Returns

Information about invitations of an workspace.

Return type

list[dict]

get_workspace_limits(self, setting=None, workspaceId=None)

Get information about Workspace limits and settings.

Parameters
  • setting (str) – Setting name.

  • workspaceId (str) – Workspace ID. Defaults to current if not specified.

Returns

Workspace limit information.

Return type

list[dict]

get_workspaces(self, organizationId=None, workspaceId=None)

Shows list of workspaces with id, name, and owner data.

Parameters
  • organizationId (str) – Organization ID to filter on. Optional

  • workspaceId (str) – Workspace ID to filter on. Optional

Returns

Workspace data for all workspaces for a user.

Return type

list[dict]

remove_workspace_guest(self, email, workspaceId=None)

Remove a guest from an existing workspace.

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

  • workspaceId (str) – Workspace ID to remove guest from. Removes from current workspace if not specified.

Returns

Response status if guest got removed from workspace succesfully.

Return type

str

remove_workspace_invitation(self, email, workspaceId=None, invitationId=None)

Remove a invitation from an existing organization.

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

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

  • inviteId (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

set_workspace(self, workspaceId)

Set the workspace to the one you wish to work in.

Parameters

workspaceId (str) – Workspace ID for the workspace you wish to work in.

set_workspace_limit(self, setting, limit, workspaceId=None)

Set a limit for a workspace.

Parameters
  • setting (str) – Setting name.

  • limit (int) – Limit to set at.

  • workspaceId (str) – Workspace ID. Defaults to current if not specified.

Returns

Workspace limit information.

Return type

list[dict]