# BatchedBackgroundMigrationsApi

All URIs are relative to *https://www.gitlab.com/api/v4*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getApiV4AdminBatchedBackgroundMigrations**](#getapiv4adminbatchedbackgroundmigrations) | **GET** /admin/batched_background_migrations | |
|[**getApiV4AdminBatchedBackgroundMigrationsId**](#getapiv4adminbatchedbackgroundmigrationsid) | **GET** /admin/batched_background_migrations/{id} | |
|[**putApiV4AdminBatchedBackgroundMigrationsIdPause**](#putapiv4adminbatchedbackgroundmigrationsidpause) | **PUT** /admin/batched_background_migrations/{id}/pause | |
|[**putApiV4AdminBatchedBackgroundMigrationsIdResume**](#putapiv4adminbatchedbackgroundmigrationsidresume) | **PUT** /admin/batched_background_migrations/{id}/resume | |

# **getApiV4AdminBatchedBackgroundMigrations**
> Array<APIEntitiesBatchedBackgroundMigration> getApiV4AdminBatchedBackgroundMigrations()

Get the list of batched background migrations

### Example

```typescript
import {
    BatchedBackgroundMigrationsApi,
    Configuration
} from 'berg';

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

let database: 'main' | 'ci' | 'embedding' | 'main_clusterwide' | 'geo'; //The name of the database, the default `main` (optional) (default to 'main')

const { status, data } = await apiInstance.getApiV4AdminBatchedBackgroundMigrations(
    database
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **database** | [**&#39;main&#39; | &#39;ci&#39; | &#39;embedding&#39; | &#39;main_clusterwide&#39; | &#39;geo&#39;**]**Array<&#39;main&#39; &#124; &#39;ci&#39; &#124; &#39;embedding&#39; &#124; &#39;main_clusterwide&#39; &#124; &#39;geo&#39;>** | The name of the database, the default &#x60;main&#x60; | (optional) defaults to 'main'|


### Return type

**Array<APIEntitiesBatchedBackgroundMigration>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Get the list of batched background migrations |  -  |
|**401** | 401 Unauthorized |  -  |
|**403** | 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)

# **getApiV4AdminBatchedBackgroundMigrationsId**
> APIEntitiesBatchedBackgroundMigration getApiV4AdminBatchedBackgroundMigrationsId()

Retrieve a batched background migration

### Example

```typescript
import {
    BatchedBackgroundMigrationsApi,
    Configuration
} from 'berg';

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

let id: number; //The batched background migration id (default to undefined)
let database: 'main' | 'ci' | 'embedding' | 'main_clusterwide' | 'geo'; //The name of the database (optional) (default to 'main')

const { status, data } = await apiInstance.getApiV4AdminBatchedBackgroundMigrationsId(
    id,
    database
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**number**] | The batched background migration id | defaults to undefined|
| **database** | [**&#39;main&#39; | &#39;ci&#39; | &#39;embedding&#39; | &#39;main_clusterwide&#39; | &#39;geo&#39;**]**Array<&#39;main&#39; &#124; &#39;ci&#39; &#124; &#39;embedding&#39; &#124; &#39;main_clusterwide&#39; &#124; &#39;geo&#39;>** | The name of the database | (optional) defaults to 'main'|


### Return type

**APIEntitiesBatchedBackgroundMigration**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Retrieve a batched background migration |  -  |
|**401** | 401 Unauthorized |  -  |
|**403** | 403 Forbidden |  -  |
|**404** | 404 Not found |  -  |

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

# **putApiV4AdminBatchedBackgroundMigrationsIdPause**
> APIEntitiesBatchedBackgroundMigration putApiV4AdminBatchedBackgroundMigrationsIdPause()

Pause a batched background migration

### Example

```typescript
import {
    BatchedBackgroundMigrationsApi,
    Configuration,
    PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest
} from 'berg';

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

let id: number; //The batched background migration id (default to undefined)
let putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest: PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest; // (optional)

const { status, data } = await apiInstance.putApiV4AdminBatchedBackgroundMigrationsIdPause(
    id,
    putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest** | **PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest**|  | |
| **id** | [**number**] | The batched background migration id | defaults to undefined|


### Return type

**APIEntitiesBatchedBackgroundMigration**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Pause a batched background migration |  -  |
|**401** | 401 Unauthorized |  -  |
|**403** | 403 Forbidden |  -  |
|**404** | 404 Not found |  -  |
|**422** | You can pause only &#x60;active&#x60; batched background migrations. |  -  |

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

# **putApiV4AdminBatchedBackgroundMigrationsIdResume**
> APIEntitiesBatchedBackgroundMigration putApiV4AdminBatchedBackgroundMigrationsIdResume()

Resume a batched background migration

### Example

```typescript
import {
    BatchedBackgroundMigrationsApi,
    Configuration,
    PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest
} from 'berg';

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

let id: number; //The batched background migration id (default to undefined)
let putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest: PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest; // (optional)

const { status, data } = await apiInstance.putApiV4AdminBatchedBackgroundMigrationsIdResume(
    id,
    putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **putApiV4AdminBatchedBackgroundMigrationsIdResumeRequest** | **PutApiV4AdminBatchedBackgroundMigrationsIdResumeRequest**|  | |
| **id** | [**number**] | The batched background migration id | defaults to undefined|


### Return type

**APIEntitiesBatchedBackgroundMigration**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Resume a batched background migration |  -  |
|**401** | 401 Unauthorized |  -  |
|**403** | 403 Forbidden |  -  |
|**404** | 404 Not found |  -  |
|**422** | You can resume only &#x60;paused&#x60; batched background migrations. |  -  |

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

