# FolderControllerApi

All URIs are relative to *http://localhost:8081*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**copyFolders**](#copyfolders) | **POST** /api/v1/folders/copy | Copy folders|
|[**countFolderElements**](#countfolderelements) | **GET** /api/v1/folders/count | Count files and subfolders contained in a given folder - return 0 if empty or not exists|
|[**createFolder**](#createfolder) | **POST** /api/v1/folders | Create a new folder|
|[**deleteFolders**](#deletefolders) | **DELETE** /api/v1/folders | Delete folders|
|[**listFolder**](#listfolder) | **GET** /api/v1/folders/list | List files and subfolders contained in a given folder|
|[**moveFolders**](#movefolders) | **POST** /api/v1/folders/move | Move folders|
|[**renameFolder**](#renamefolder) | **PUT** /api/v1/folders/{folderId}/rename | Rename a folder|

# **copyFolders**
> copyFolders(copyRequest)

Copies a set of folders (and their contents) into an existing target folder.

### Example

```typescript
import {
    FolderControllerApi,
    Configuration,
    CopyRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let copyRequest: CopyRequest; //

const { status, data } = await apiInstance.copyFolders(
    copyRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **copyRequest** | **CopyRequest**|  | |


### Return type

void (empty response body)

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **countFolderElements**
> number countFolderElements()

Retrieves the number of elements (files and folders) contained in a given folder - return 0 if empty or not exists(no recursive count, just count the flat list of objects at the root level of a folder)

### Example

```typescript
import {
    FolderControllerApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let folderId: string; //ID of the folder or to count elements at the root level (optional) (default to undefined)

const { status, data } = await apiInstance.countFolderElements(
    folderId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **folderId** | [**string**] | ID of the folder or to count elements at the root level | (optional) defaults to undefined|


### Return type

**number**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **createFolder**
> FolderResponse createFolder(createFolderRequest)

Creates a new folder, optionally under a parent folder.

### Example

```typescript
import {
    FolderControllerApi,
    Configuration,
    CreateFolderRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let createFolderRequest: CreateFolderRequest; //

const { status, data } = await apiInstance.createFolder(
    createFolderRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **createFolderRequest** | **CreateFolderRequest**|  | |


### Return type

**FolderResponse**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: */*


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteFolders**
> deleteFolders(deleteRequest)

Deletes a set of folders and their contents from storage and database.

### Example

```typescript
import {
    FolderControllerApi,
    Configuration,
    DeleteRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let deleteRequest: DeleteRequest; //

const { status, data } = await apiInstance.deleteFolders(
    deleteRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **deleteRequest** | **DeleteRequest**|  | |


### Return type

void (empty response body)

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **listFolder**
> Array<FolderElementInfo> listFolder()

Retrieves document information of all files and subfolders contained in a given folder (no recursive list, just the flat list of objects at the root level of a folder)

### Example

```typescript
import {
    FolderControllerApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let folderId: string; //if null, empty or not provided, then lists the content of the root folder (optional) (default to undefined)
let onlyFiles: boolean; //if true, only files are listed (optional) (default to false)
let onlyFolders: boolean; //if true, only folders are listed (optional) (default to false)

const { status, data } = await apiInstance.listFolder(
    folderId,
    onlyFiles,
    onlyFolders
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **folderId** | [**string**] | if null, empty or not provided, then lists the content of the root folder | (optional) defaults to undefined|
| **onlyFiles** | [**boolean**] | if true, only files are listed | (optional) defaults to false|
| **onlyFolders** | [**boolean**] | if true, only folders are listed | (optional) defaults to false|


### Return type

**Array<FolderElementInfo>**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **moveFolders**
> moveFolders(moveRequest)

Moves a set of folders (and their contents) into an existing target folder.

### Example

```typescript
import {
    FolderControllerApi,
    Configuration,
    MoveRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let moveRequest: MoveRequest; //

const { status, data } = await apiInstance.moveFolders(
    moveRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **moveRequest** | **MoveRequest**|  | |


### Return type

void (empty response body)

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **renameFolder**
> ElementInfo renameFolder(renameRequest)

Renames an existing folder.

### Example

```typescript
import {
    FolderControllerApi,
    Configuration,
    RenameRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new FolderControllerApi(configuration);

let folderId: string; // (default to undefined)
let renameRequest: RenameRequest; //

const { status, data } = await apiInstance.renameFolder(
    folderId,
    renameRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **renameRequest** | **RenameRequest**|  | |
| **folderId** | [**string**] |  | defaults to undefined|


### Return type

**ElementInfo**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: */*


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

