anatools.client.workspaces module

Workspace Functions

add_workspace_guest(self, email, workspaceId=None)

Add a user to an existing organization. :param email: Email of user to add. :type email: str :param role: Role for user. :type role: str :param organizationId: Organization ID to add members too. Uses current if not specified. :type organizationId: str :param workspaceId: Workspace ID to add members to. Uses current if not specified. :type workspaceId: str

Returns

Response status if user got added to workspace succesfully.

Return type

str

create_workspace(self, name, channelIds=[])

Create a new workspace with specific channels. :param name: New workspace name. :type name: str :param channels: List of channel names to add to workspace. :type channels: list

Returns

Workspace ID if creation was successful. Otherwise returns message.

Return type

str

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

Delete an existing workspace. :param workspaceId: Workspace ID for workspace to get deleted. Deletes current workspace if not specified. :type workspaceId: str :param prompt: Set to True if avoiding prompts for deleting workspace. :type prompt: bool

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. :param channels: Names of channels to add to workspace. :type channels: list :param name: New name to replace old one. :type name: str :param workspaceId: Workspace ID for workspace to update. :type workspaceId: str

Returns

Success or failure message if workspace description was sucessfully updated.

Return type

str

get_workspace(self)

Get workspace id of current workspace. :returns: Workspace ID of current workspace. :rtype: str

get_workspace_guests(self, workspaceId=None)

Get users of an organization optionally filtered on workspace. :param organizationId: Organization ID. Defaults to current if not specified. :type organizationId: str :param workspaceId: Workspace Id. Optional. :type workspaceId: str

Returns

json object with users of an organization

Return type

json

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

Get information about Organization limits and setting. :param workspaceId: Workspace ID. Defaults to current if not specified. :type workspaceId: str :param setting: Setting name. :type setting: str

Returns

Workspace limit information.

Return type

json

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

Shows list of workspaces with id, name, and owner data. :returns: Workspace data for all workspaces for a user. :rtype: dict

remove_workspace_guest(self, email, workspaceId=None)

Remove a member from an existing workspace. :param email: Member email to remove. :type email: str :param organizationId: Organization ID to remove member from. Removes from current organization if not specified. :type organizationId: str :param workspaceId: Workspace ID to remove member from. Removes from current workspace if not specified. :type workspaceId: str

Returns

Response status if member got removed from organization or workspace succesfully.

Return type

str

set_workspace(self, workspaceId)

Set the workspace to the one you wish to work in. :param workspaceid: Workspace ID for the workspace you wish to work in. :type workspaceid: str

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

Set a limit for a workspace. :param workspaceId: Workspace ID. Defaults to current if not specified. :type workspaceId: str :param setting: Setting name. :type setting: str :param limit: Limit to set at. :type limit: Int

Returns

Workspace limit information.

Return type

json