# DatabaseBackupApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**downloadBackup**](#downloadbackup) | **GET** /database/backup/{databaseBackupVersion} | Download database backup|
|[**triggerBackup**](#triggerbackup) | **POST** /database/backup | Trigger database backup|

# **downloadBackup**
> File downloadBackup()


### Example

```typescript
import {
    DatabaseBackupApi,
    Configuration
} from './api';

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

let databaseBackupVersion: 'LATEST'; //The version of the database backup. (default to undefined)

const { status, data } = await apiInstance.downloadBackup(
    databaseBackupVersion
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **databaseBackupVersion** | [**&#39;LATEST&#39;**]**Array<&#39;LATEST&#39;>** | The version of the database backup. | defaults to undefined|


### Return type

**File**

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+zip


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Database backup downloaded. |  * Content-Disposition - The format is - attachment; filename&#x3D;\&quot;{static_backup_file_name}.zip\&quot; <br>  * Content-Length - The length of the request body. <br>  * Last-Modified - The start date from the last completed backup process. <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

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

# **triggerBackup**
> TriggerDatabaseBackupResponse triggerBackup()


### Example

```typescript
import {
    DatabaseBackupApi,
    Configuration,
    TriggerDatabaseBackupRequest
} from './api';

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

let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)
let triggerDatabaseBackupRequest: TriggerDatabaseBackupRequest; //The request for triggering a database backup. (optional)

const { status, data } = await apiInstance.triggerBackup(
    idempotencyKey,
    triggerDatabaseBackupRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **triggerDatabaseBackupRequest** | **TriggerDatabaseBackupRequest**| The request for triggering a database backup. | |
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**TriggerDatabaseBackupResponse**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**202** | Database backup triggered. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

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

