# FolderApi

## getFullFolderTree

Retrieves the full folder tree.

```
FolderApi.getFullFolderTree(orderBy) -> List[Dict]
```

Parameters

```
orderBy: Specifies the ordering of the folders.
```

Returns

```
List of dictionaries representing the full folder tree.
```

## getHomeFolderTree

Retrieves the home folder tree.

```
FolderApi.getHomeFolderTree(orderBy) -> Dict
```

Parameters

```
orderBy: Specifies the ordering of the folders.
```

Returns

```
Dictionary representing the home folder tree.
```

## getHomeSubFolderTree

Retrieves the subfolders of the home folder.

```
FolderApi.getHomeSubFolderTree(orderBy) -> List[Dict]
```

Parameters

```
orderBy: Specifies the ordering of the folders.
```

Returns

```
List of dictionaries representing the subfolders of the home folder.
```

## getFolderAndFiles

Retrieves the contents of a folder including subfolders and files.

```
FolderApi.getFolderAndFiles(folderId, orderBy, deleted) -> Dict
```

Parameters

```
folderId: The ID of the folder to retrieve contents from.
orderBy: Specifies the ordering of the contents.
deleted: Indicates whether to include deleted items.
```

Returns

```
Dictionary containing the folder and its files.
```

## getSubFolders

Retrieves the subfolders of a folder.

```
FolderApi.getSubFolders(folderId, orderBy) -> Dict
```

Parameters

```
folderId: The ID of the folder to retrieve subfolders from.
orderBy: Specifies the ordering of the subfolders.
```

Returns

```
Dictionary containing the subfolders of the specified folder.
```

## getFolderParents

&#x20;Retrieves the parent folders of a folder.

```
FolderApi.getFolderParents(folderId) -> Dict
```

Parameters

```
folderId: The ID of the folder to retrieve parent folders for.
```

Returns

```
Dictionary containing the parent folders of the specified folder.
```

## getHomeFolderFiles

Retrieves the files in the home folder.

```
FolderApi.getHomeFolderFiles(orderBy) -> Dict
```

Parameters

```
orderBy: Specifies the ordering of the files.
```

Returns

```
Dictionary containing the files in the home folder.
```

## getFolderTask

Retrieves the task associated with a folder.

```
FolderApi.getFolderTask(folderId) -> Dict
```

Parameters

```
folderId: The ID of the folder to retrieve the task for.
```

Returns

```
Dictionary containing the task associated with the folder.
```

## createFolder

&#x20;Creates a new folder.

```
FolderApi.createFolder(folder) -> Dict
```

Parameters

```
folder: Dictionary representing the folder to be created.
```

Returns

```
Dictionary containing the result of the folder creation operation.
```

## updateFolder

Updates an existing folder.

```
FolderApi.updateFolder(folder) -> Dict
```

Parameters

```
folder: Dictionary representing the folder to be updated.
```

Returns

```
Dictionary containing the result of the folder update operation.
```

## renameFolder

Renames a folder.

```
FolderApi.renameFolder(folderId, newName) -> Dict
```

Parameters

```
folderId: The ID of the folder to be renamed.
newName: The new name for the folder.
```

Returns

```
Dictionary containing the result of the folder rename operation.
```

## moveFolder

Moves a folder to a new parent folder.

```
FolderApi.moveFolder(folderId, newParentId) -> Dict
```

Parameters

```
folderId: The ID of the folder to be moved.
newParentId: The ID of the new parent folder.
```

Returns

```
Dictionary containing the result of the folder move operation.
```

## deleteFolder

Deletes a folder.

```
FolderApi.deleteFolder(folderId) -> Dict
```

Parameters

```
folderId: The ID of the folder to be deleted.
```

Returns

```
Dictionary containing the result of the folder deletion operation.
```

## deleteGroup

Deletes a group.

```
FolderApi.deleteGroup(groupId) -> Dict
```

Parameters

```
groupId: The ID of the group to be deleted.
```

Returns

```
Dictionary containing the result of the group deletion operation.
```

## createUploadSignedUrl

Creates a signed URL for uploading files to a folder.

```
FolderApi.createUploadSignedUrl(folderId, duration=None) -> Dict
```

Parameters

```
folderId: The ID of the folder where files will be uploaded.
duration: The duration for which the signed URL is valid (optional).
```

Returns

```
Dictionary containing the signed URL for uploading files.
```

## createDownloadSignedUrl

Creates a signed URL for downloading files.

```
FolderApi.createDownloadSignedUrl(id, baseUri=None, duration=None) -> Dict
```

Parameters

```
id: The ID of the file to be downloaded.
baseUri: The base URI for downloading the file (optional).
duration: The duration for which the signed URL is valid (optional).
```

Returns

```
Dictionary containing the signed URL for downloading files.
```

## renameFile

Renames a file.

```
FolderApi.renameFile(fileId, newName) -> Dict
```

Parameters

```
fileId: The ID of the file to be renamed.
newName: The new name for the file.
```

Returns

```
Dictionary containing the result of the file rename operation.
```

## moveFile

Moves a file to a new parent folder.

```
FolderApi.moveFile(fileId, newParentFolderId) -> Dict
```

Parameters

```
fileId: The ID of the file to be moved.
newParentFolderId: The ID of the new parent folder.
```

Returns

```
Dictionary containing the result of the file move operation.
```

## deleteFile

Deletes a file.

```
FolderApi.deleteFile(fileId) -> Dict
```

Parameters

```
fileId: The ID of the file to be deleted.
```

Returns

```
Dictionary containing the result of the file deletion operation.
```

## deleteFile2

Deletes a file with additional folder name.

```
FolderApi.deleteFile2(fileId, folderName) -> Dict
```

Parameters

```
fileId: The ID of the file to be deleted.
folderName: The name of the folder containing the file.
```

Returns

```
Dictionary containing the result of the file deletion operation.
```

## deleteManyFiles

Deletes multiple files.

```
FolderApi.deleteManyFiles(ids) -> Dict
```

Parameters

```
ids: List of IDs of files to be deleted.
```

Returns

```
Dictionary containing the result of the file deletion operation.
```

## restoreManyFiles

Restores multiple files from the trash.

```
FolderApi.restoreManyFiles(ids, keepId) -> Dict
```

Parameters

```
ids: List of IDs of files to be restored.
keepId: Indicates whether to keep the original IDs.

```

Returns

```
Dictionary containing the result of the file restoration operation.
```

## copyFile

Copies a file to a new location.

```
FolderApi.copyFile(fileId, newParentFolderId, newName) -> Dict
```

Parameters

```
fileId: The ID of the file to be copied.
newParentFolderId: The ID of the destination folder.
newName: The new name for the copied file.
```

Returns

```
Dictionary containing the result of the file copy operation.
```

## shareFile

Shares a file with a user.

```
FolderApi.shareFile(fileId, targetFolderPath, idOfUserToShareWith) -> Dict
```

Parameters

```
fileId: The ID of the file to be shared.
targetFolderPath: The path of the folder where the file will be shared.
idOfUserToShareWith: The ID of the user to share the file with.
```

Returns

```
Dictionary containing the result of the file sharing operation.
```

## assignFile

Assigns a file to a user.

```
FolderApi.assignFile(fileId, idOfUserToAssign) -> Dict
```

Parameters

```
fileId: The ID of the file to be assigned.
idOfUserToAssign: The ID of the user to assign the file to.
```

Returns

```
Dictionary containing the result of the file assignment operation.
```

## updateStatus

Updates the status of a file.

```
FolderApi.updateStatus(fileId, status) -> Dict
```

Parameters

```
fileId: The ID of the file to update the status for.
status: The new status of the file.
```

Returns

```
Dictionary containing the result of the status update operation.
```

## saveFileObject

Saves a file object.

```
FolderApi.saveFileObject(params) -> Dict
```

Parameters

```
params: Parameters to save the file object.
```

Returns

```
Dictionary containing the result of the file object saving operation.
```

## saveFileObjectWithTask

Saves a file object with a task.

```
FolderApi.saveFileObjectWithTask(params) -> Dict
```

Parameters

```
params: Parameters to save the file object with task.
```

Returns

```
Dictionary containing the result of the file object saving operation with task.
```

## saveFileObjectWithFunction

Saves a file object with a function.

```
FolderApi.saveFileObjectWithFunction(params) -> Dict
```

Parameters

```
params: Parameters to save the file object with function.
```

Returns

```
Dictionary containing the result of the file object saving operation with function.
```

## retrieveSignedUrl

Retrieves a signed URL for a file.

```
FolderApi.retrieveSignedUrl(params) -> Dict
```

Parameters

```
params: Parameters to retrieve the signed URL.
```

Returns

```
Dictionary containing the signed URL for the file.
```

## saveFileGetSignedUrl

Saves a file and retrieves a signed URL.

```
FolderApi.saveFileGetSignedUrl(params) -> Dict
```

Parameters

```
params: Parameters to save the file and retrieve the signed URL.
```

Returns

```
Dictionary containing the result of the file saving operation and the signed URL.
```

## retrieveSignedUrlPublic

Retrieves a signed URL for a public file.

```
FolderApi.retrieveSignedUrlPublic(params) -> Dict
```

Parameters

```
params: Parameters to retrieve the signed URL for a public file.
```

Returns

```
Dictionary containing the signed URL for the public file.
```

## saveFolderTask

Saves a folder task.

```
FolderApi.saveFolderTask(params) -> Dict
```

Parameters

```
params: Parameters to save the folder task.
```

Returns

```
Dictionary containing the result of the folder task saving operation.
```

## search

Searches for items based on provided parameters.

```
FolderApi.search(params) -> Dict
```

Parameters

```
params: Parameters for the search operation.
```

Returns

```
Dictionary containing the search results.
```

## autoComplete

Provides auto-completion based on provided parameters.

```
FolderApi.autoComplete(params) -> Dict
```

Parameters

```
params: Parameters for the auto-completion operation.
```

Returns

```
Dictionary containing the auto-completion results.
```

## isBusy

Checks if a provider is busy.

```
FolderApi.isBusy(providerName) -> Dict
```

Parameters

```
providerName: The name of the provider to check.
```

Returns

```
Dictionary containing the result of the provider busy check.
```

## startFullSyncTask

Starts a full synchronization task for a provider.

```
FolderApi.startFullSyncTask(providerName) -> Dict
```

Parameters

```
providerName: The name of the provider to start the full sync task for.
```

Returns

```
Dictionary containing the result of the full sync task start operation.
```

## syncFolder

Synchronizes a folder.

```
FolderApi.syncFolder(folderId) -> Dict
```

Parameters

```
folderId: The ID of the folder to synchronize.
```

Returns

```
Dictionary containing the result of the folder synchronization operation.
```

## getCreateGroupFolderWithFiles

Retrieves or creates a group folder with files.

```
FolderApi.getCreateGroupFolderWithFiles(path) -> Dict
```

Parameters

```
path: The path of the group folder.
```

Returns

```
Dictionary containing the result of the group folder retrieval or creation operation.
```

## retrieveManyUploadSignedUrls

Retrieves many signed URLs for uploading files.

```
FolderApi.retrieveManyUploadSignedUrls(bucketName, folderName, subFolder, folderId, fileNames, contentType, duration, functionName, functionParams) -> Dict
```

Parameters

```
bucketName: The name of the bucket.
folderName: The name of the folder.
subFolder: The subfolder within the folder.
folderId: The ID of the folder.
fileNames: List of file names.
contentType: The content type of the files.
duration: The duration for which the signed URL is valid.
functionName: The name of the function.
functionParams: The parameters for the function.

```

Returns

```
Dictionary containing the result of the signed URL retrieval operation.
```

## retrieveSignedUrl (multimethod)

Retrieves a signed URL for a file using different parameters.

```
FolderApi.retrieveSignedUrl(fileId, bucketName, folderName, subFolder, folderId, fileName, contentType, method, asAttachment, duration, publicShare) -> Dict
```

Parameters

```
fileId: The ID of the file.
bucketName: The name of the bucket.
folderName: The name of the folder.
subFolder: The subfolder within the folder.
folderId: The ID of the folder.
fileName: The name of the file.
contentType: The content type of the file.
method: The method for retrieving the signed URL.
asAttachment: Indicates whether to treat the file as an attachment.
duration: The duration for which the signed URL is valid.
publicShare: Indicates whether the file is publicly shared.
```

Returns

```
Dictionary containing the signed URL for the file.
```
