# BackgroundProcessApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getLatestByType**](#getlatestbytype) | **GET** /backgroundprocess/latest | Get the latest manual or automatic end of day (EOD) process by specifying the type|
|[**update**](#update) | **PUT** /backgroundprocess/{encodedKey} | Cancel manual or automatic end of day (EOD) processes using the encoded key|

# **getLatestByType**
> BackgroundProcess getLatestByType()


### Example

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

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

let type: 'CRON_JOBS' | 'EARLY_MANUAL_CRON_JOBS_TRIGGER' | 'MANUAL_CRON_JOBS_TRIGGER'; //The type of background process according to which the latest process should be returned. (optional) (default to undefined)

const { status, data } = await apiInstance.getLatestByType(
    type
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **type** | [**&#39;CRON_JOBS&#39; | &#39;EARLY_MANUAL_CRON_JOBS_TRIGGER&#39; | &#39;MANUAL_CRON_JOBS_TRIGGER&#39;**]**Array<&#39;CRON_JOBS&#39; &#124; &#39;EARLY_MANUAL_CRON_JOBS_TRIGGER&#39; &#124; &#39;MANUAL_CRON_JOBS_TRIGGER&#39;>** | The type of background process according to which the latest process should be returned. | (optional) defaults to undefined|


### Return type

**BackgroundProcess**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Latest background process returned. |  -  |
|**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)

# **update**
> BackgroundProcess update(body)


### Example

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

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

let encodedKey: string; //The encoded key of the background process which should be changed. (default to undefined)
let body: string; //Background process state to set.

const { status, data } = await apiInstance.update(
    encodedKey,
    body
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **body** | **string**| Background process state to set. | |
| **encodedKey** | [**string**] | The encoded key of the background process which should be changed. | defaults to undefined|


### Return type

**BackgroundProcess**

### 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 |
|-------------|-------------|------------------|
|**200** | Background process state has been changed. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Background process not found. |  -  |
|**500** | Internal Error |  -  |

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

