anatools.anaclient.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=[], volumeIds=[], code=None)

Create a new workspace with specific channels.

Parameters
  • name (str) – New workspace name.

  • channelIds (list[str]) – List of channel ids to add to workspace.

  • volumeIds (list[str]) – List of volume ids that the workspace will have access to.

  • code (str) – Content code that used for creating a 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, channelIds=None, volumeIds=None, ganIds=None, mapIds=None, workspaceId=None)

Edit workspace information.

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

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

  • volumeIds (list[str]) – List of volume ids that the workspace will have access to.

  • ganIds (list[str]) – List of GAN ids that the workspace will have access to.

  • mapIds (list[str]) – List of map ids 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

bool

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]