# FileControllerApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**copyFiles**](#copyfiles) | **POST** /api/v1/files/copy | Copy files|
|[**deleteFiles**](#deletefiles) | **DELETE** /api/v1/files | Delete files|
|[**moveFiles**](#movefiles) | **POST** /api/v1/files/move | Move files|
|[**renameFile**](#renamefile) | **PUT** /api/v1/files/{fileId}/rename | Rename a file|
|[**unzipFile**](#unzipfile) | **POST** /api/v1/files/{fileId}/unzip | Extract a ZIP file|

# **copyFiles**
> Array<CopyResponse> copyFiles(copyRequest)

Copies a set of files into an existing target folder.

### Example

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

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

let copyRequest: CopyRequest; //

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

### Parameters

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


### Return type

**Array<CopyResponse>**

### 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)

# **deleteFiles**
> deleteFiles(deleteRequest)

Deletes a set of files from storage and database.

### Example

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

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

let deleteRequest: DeleteRequest; //

const { status, data } = await apiInstance.deleteFiles(
    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)

# **moveFiles**
> moveFiles(moveRequest)

Moves a set of files into an existing target folder.

### Example

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

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

let moveRequest: MoveRequest; //

const { status, data } = await apiInstance.moveFiles(
    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)

# **renameFile**
> ElementInfo renameFile(renameRequest)

Renames an existing file.

### Example

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

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

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

const { status, data } = await apiInstance.renameFile(
    fileId,
    renameRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **renameRequest** | **RenameRequest**|  | |
| **fileId** | [**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)

# **unzipFile**
> UnzipResponse unzipFile()

Extracts a ZIP document server-side, recreating its folder tree. Destination: the root when targetRoot is true, else targetFolderId, else the folder containing the ZIP; with newFolderName, a new folder of that name is created there first. Folders that already exist are merged; files whose name already exists are skipped (unless allowDuplicateFileNames) and listed in the response, like any entry that could not be extracted. Archive-wide limits answer 413 (ZIP_TOO_MANY_ENTRIES, ZIP_TOO_LARGE, ZIP_BOMB); a document that is not a readable ZIP answers 422 (NOT_A_ZIP, ZIP_INVALID).

### Example

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

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

let fileId: string; //Id of the ZIP document (default to undefined)
let unzipRequest: UnzipRequest; // (optional)

const { status, data } = await apiInstance.unzipFile(
    fileId,
    unzipRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **unzipRequest** | **UnzipRequest**|  | |
| **fileId** | [**string**] | Id of the ZIP document | defaults to undefined|


### Return type

**UnzipResponse**

### 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)

