Skip to content

Python SDK - Workspace

askanna.workspace.get

import askanna

workspace = askanna.workspace.get(workspace_suuid="{WORKSPACE_SUUID}")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to get the info from

Output

Dataclass: Workspace

askanna.workspace.list

import askanna

workspace_list = askanna.workspace.list()

Parameters

Name Type Required Description
is_member Bool No Filter on workspaces where the authenticated user is a member.
visibility String No Filter on workspaces with a specific visibility ("PRIVATE" or "PUBLIC")
number_of_result Integer No The number of workspaces in the result. Defaults to 100.
order_by String No Sets the ordering of the workspace list. Defaults to "-created_at".
search String No Search for a specific workspace

Output

List with elements with Dataclass: Workspace

askanna.workspace.create

import askanna

workspace = askanna.workspace.create(name="Workspace name")

Parameters

Name Type Required Description
name String Yes Name for the new workspace
description String No Description for the new workspace. Defaults to an empty description.
visibility String No Visibility of the new workspace. Allowed values are "PRIVATE" and "PUBLIC". Defaults to "PRIVATE".

Output

Dataclass: Workspace

askanna.workspace.change

import askanna

workspace = askanna.workspace.change(workspace_suuid="{WORKSPACE_SUUID}", name="New workspace name")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to change
name String No New name for the workspace. Defaults to None (do not change).
description String No New description for the workspace. Defaults to None (do not change).
visibility String No Visibility of the workspace. Allowed values are "PRIVATE", "PUBLIC" or None. Defaults to None (do not change).

To change workspace info, at least we need a new name, description or visibility

Output

Dataclass: Workspace

askanna.workspace.delete

import askanna

askanna.workspace.delete(workspace_suuid="{WORKSPACE_SUUID}")

Parameters

Name Type Required Description
workspace_suuid String Yes SUUID of the workspace you want to delete

Output

Bool: True if the workspace is succesfully deleted