Folder
Warning
The functions are not fully tested yet. Use with caution. Please report any issues to the GitHub repository.
folder_create
folder_create(
workspace_id: str,
display_name: str,
parent_folder_id: str = None,
preview: bool = True,
) -> requests.Response
Create a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
display_name
|
str
|
The display name of the folder. |
required |
parent_folder_id
|
str | None
|
The parent folder ID. If not specified or null, the folder is created with the workspace as its parent folder. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |
folder_get
folder_get(
workspace_id: str, folder_id: str, preview: bool = True
) -> requests.Response
Get a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
folder_id
|
str
|
The id of the folder to get. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |
folder_list
folder_list(
workspace_id: str,
recursive: bool = None,
root_folder_id: str = None,
continuation_token: str = None,
preview: bool = True,
) -> requests.Response
List folders.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
recursive
|
bool | None
|
Lists folders in a folder and its nested folders, or just a folder only. True - All folders in the folder and its nested folders are listed, False - Only folders in the folder are listed. |
None
|
root_folder_id
|
str | None
|
This parameter allows users to filter folders based on a specific root folder. If not provided, the workspace is used as the root folder. |
None
|
continuation_token
|
str | None
|
A token for retrieving the next page of results. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |
folder_update
folder_update(
workspace_id: str,
folder_id: str,
display_name: str,
preview: bool = True,
) -> requests.Response
Update a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
folder_id
|
str
|
The id of the folder to update. |
required |
display_name
|
str
|
The display name of the folder. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |
folder_delete
folder_delete(
workspace_id: str, folder_id: str, preview: bool = True
) -> requests.Response
Delete a folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
folder_id
|
str
|
The id of the folder to delete. |
required |
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |
folder_move
folder_move(
workspace_id: str,
folder_id: str,
target_folder_id: str = None,
preview: bool = True,
) -> requests.Response
Moves the specified folder within the same workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
The workspace id. |
required |
folder_id
|
str
|
The id of the folder to delete. |
required |
target_folder_id
|
str | None
|
The destination folder ID. If not provided, the workspace is used as the destination folder. |
None
|
preview
|
bool
|
Whether to preview the request. You will be asked to confirm the request before it is executed. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
The response from the request. |