# BulkImportsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getApiV4BulkImports**](#getapiv4bulkimports) | **GET** /bulk_imports | List all GitLab Migrations|
|[**getApiV4BulkImportsEntities**](#getapiv4bulkimportsentities) | **GET** /bulk_imports/entities | List all GitLab Migrations\&#39; entities|
|[**getApiV4BulkImportsImportId**](#getapiv4bulkimportsimportid) | **GET** /bulk_imports/{import_id} | Get GitLab Migration details|
|[**getApiV4BulkImportsImportIdEntities**](#getapiv4bulkimportsimportidentities) | **GET** /bulk_imports/{import_id}/entities | List GitLab Migration entities|
|[**getApiV4BulkImportsImportIdEntitiesEntityId**](#getapiv4bulkimportsimportidentitiesentityid) | **GET** /bulk_imports/{import_id}/entities/{entity_id} | Get GitLab Migration entity details|
|[**postApiV4BulkImports**](#postapiv4bulkimports) | **POST** /bulk_imports | Start a new GitLab Migration|

# **getApiV4BulkImports**
> Array<APIEntitiesBulkImport> getApiV4BulkImports()

This feature was introduced in GitLab 14.1.

### Example

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

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

let page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)
let sort: 'asc' | 'desc'; //Return GitLab Migrations sorted in created by `asc` or `desc` order. (optional) (default to 'desc')
let status: 'created' | 'started' | 'finished' | 'timeout' | 'failed'; //Return GitLab Migrations with specified status (optional) (default to undefined)

const { status, data } = await apiInstance.getApiV4BulkImports(
    page,
    perPage,
    sort,
    status
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|
| **sort** | [**&#39;asc&#39; | &#39;desc&#39;**]**Array<&#39;asc&#39; &#124; &#39;desc&#39;>** | Return GitLab Migrations sorted in created by &#x60;asc&#x60; or &#x60;desc&#x60; order. | (optional) defaults to 'desc'|
| **status** | [**&#39;created&#39; | &#39;started&#39; | &#39;finished&#39; | &#39;timeout&#39; | &#39;failed&#39;**]**Array<&#39;created&#39; &#124; &#39;started&#39; &#124; &#39;finished&#39; &#124; &#39;timeout&#39; &#124; &#39;failed&#39;>** | Return GitLab Migrations with specified status | (optional) defaults to undefined|


### Return type

**Array<APIEntitiesBulkImport>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List all GitLab Migrations |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**503** | Service unavailable |  -  |

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

# **getApiV4BulkImportsEntities**
> Array<APIEntitiesBulkImports> getApiV4BulkImportsEntities()

This feature was introduced in GitLab 14.1.

### Example

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

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

let page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)
let sort: 'asc' | 'desc'; //Return GitLab Migrations sorted in created by `asc` or `desc` order. (optional) (default to 'desc')
let status: 'created' | 'started' | 'finished' | 'timeout' | 'failed'; //Return all GitLab Migrations\' entities with specified status (optional) (default to undefined)

const { status, data } = await apiInstance.getApiV4BulkImportsEntities(
    page,
    perPage,
    sort,
    status
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|
| **sort** | [**&#39;asc&#39; | &#39;desc&#39;**]**Array<&#39;asc&#39; &#124; &#39;desc&#39;>** | Return GitLab Migrations sorted in created by &#x60;asc&#x60; or &#x60;desc&#x60; order. | (optional) defaults to 'desc'|
| **status** | [**&#39;created&#39; | &#39;started&#39; | &#39;finished&#39; | &#39;timeout&#39; | &#39;failed&#39;**]**Array<&#39;created&#39; &#124; &#39;started&#39; &#124; &#39;finished&#39; &#124; &#39;timeout&#39; &#124; &#39;failed&#39;>** | Return all GitLab Migrations\&#39; entities with specified status | (optional) defaults to undefined|


### Return type

**Array<APIEntitiesBulkImports>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List all GitLab Migrations\&#39; entities |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**503** | Service unavailable |  -  |

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

# **getApiV4BulkImportsImportId**
> APIEntitiesBulkImport getApiV4BulkImportsImportId()

This feature was introduced in GitLab 14.1.

### Example

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

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

let importId: number; //The ID of user\'s GitLab Migration (default to undefined)

const { status, data } = await apiInstance.getApiV4BulkImportsImportId(
    importId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **importId** | [**number**] | The ID of user\&#39;s GitLab Migration | defaults to undefined|


### Return type

**APIEntitiesBulkImport**

### 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 GitLab Migration details |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**503** | Service unavailable |  -  |

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

# **getApiV4BulkImportsImportIdEntities**
> Array<APIEntitiesBulkImports> getApiV4BulkImportsImportIdEntities()

This feature was introduced in GitLab 14.1.

### Example

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

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

let importId: number; //The ID of user\'s GitLab Migration (default to undefined)
let status: 'created' | 'started' | 'finished' | 'timeout' | 'failed'; //Return import entities with specified status (optional) (default to undefined)
let page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)

const { status, data } = await apiInstance.getApiV4BulkImportsImportIdEntities(
    importId,
    status,
    page,
    perPage
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **importId** | [**number**] | The ID of user\&#39;s GitLab Migration | defaults to undefined|
| **status** | [**&#39;created&#39; | &#39;started&#39; | &#39;finished&#39; | &#39;timeout&#39; | &#39;failed&#39;**]**Array<&#39;created&#39; &#124; &#39;started&#39; &#124; &#39;finished&#39; &#124; &#39;timeout&#39; &#124; &#39;failed&#39;>** | Return import entities with specified status | (optional) defaults to undefined|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|


### Return type

**Array<APIEntitiesBulkImports>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List GitLab Migration entities |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**503** | Service unavailable |  -  |

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

# **getApiV4BulkImportsImportIdEntitiesEntityId**
> APIEntitiesBulkImports getApiV4BulkImportsImportIdEntitiesEntityId()

This feature was introduced in GitLab 14.1.

### Example

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

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

let importId: number; //The ID of user\'s GitLab Migration (default to undefined)
let entityId: number; //The ID of GitLab Migration entity (default to undefined)

const { status, data } = await apiInstance.getApiV4BulkImportsImportIdEntitiesEntityId(
    importId,
    entityId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **importId** | [**number**] | The ID of user\&#39;s GitLab Migration | defaults to undefined|
| **entityId** | [**number**] | The ID of GitLab Migration entity | defaults to undefined|


### Return type

**APIEntitiesBulkImports**

### 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 GitLab Migration entity details |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**503** | Service unavailable |  -  |

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

# **postApiV4BulkImports**
> APIEntitiesBulkImport postApiV4BulkImports()

This feature was introduced in GitLab 14.2.

### Example

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

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

let configurationUrl: string; //Source GitLab instance URL (default to undefined)
let configurationAccessToken: string; //Access token to the source GitLab instance (default to undefined)
let entitiesSourceType: Array<string>; //Source entity type (default to undefined)
let entitiesSourceFullPath: Array<string>; //Relative path of the source entity to import (default to undefined)
let entitiesDestinationNamespace: Array<string>; //Destination namespace for the entity (default to undefined)
let entitiesDestinationSlug: Array<string>; //Destination slug for the entity (optional) (default to undefined)
let entitiesDestinationName: Array<string>; //Deprecated: Use :destination_slug instead. Destination slug for the entity (optional) (default to undefined)
let entitiesMigrateProjects: Array<boolean>; //Indicates group migration should include nested projects (optional) (default to undefined)

const { status, data } = await apiInstance.postApiV4BulkImports(
    configurationUrl,
    configurationAccessToken,
    entitiesSourceType,
    entitiesSourceFullPath,
    entitiesDestinationNamespace,
    entitiesDestinationSlug,
    entitiesDestinationName,
    entitiesMigrateProjects
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **configurationUrl** | [**string**] | Source GitLab instance URL | defaults to undefined|
| **configurationAccessToken** | [**string**] | Access token to the source GitLab instance | defaults to undefined|
| **entitiesSourceType** | **Array<&#39;group_entity&#39; &#124; &#39;project_entity&#39;>** | Source entity type | defaults to undefined|
| **entitiesSourceFullPath** | **Array&lt;string&gt;** | Relative path of the source entity to import | defaults to undefined|
| **entitiesDestinationNamespace** | **Array&lt;string&gt;** | Destination namespace for the entity | defaults to undefined|
| **entitiesDestinationSlug** | **Array&lt;string&gt;** | Destination slug for the entity | (optional) defaults to undefined|
| **entitiesDestinationName** | **Array&lt;string&gt;** | Deprecated: Use :destination_slug instead. Destination slug for the entity | (optional) defaults to undefined|
| **entitiesMigrateProjects** | **Array&lt;boolean&gt;** | Indicates group migration should include nested projects | (optional) defaults to undefined|


### Return type

**APIEntitiesBulkImport**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Start a new GitLab Migration |  -  |
|**400** | Bad request |  -  |
|**401** | Unauthorized |  -  |
|**404** | Not found |  -  |
|**422** | Unprocessable entity |  -  |
|**503** | Service unavailable |  -  |

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

