anatools.anaclient.workspaces module

Workspace Functions

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_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_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.