Use this API to start and track offline transfer exports and imports, which migrate data between GitLab instances that cannot reach each other over a network.
List all offline transfer exports
GET /api/v4/offline_exports
Lists all offline transfer exports. For more information, see https://docs.gitlab.com/user/group/import/offline_transfer_migrations/
Parameters
| Name | Type | Description |
|---|---|---|
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
sortQuery | String | Return offline transfer exports sorted in created by asc or desc orderAllowed values: asc,descDefault: desc |
statusQuery | String | Return offline transfer exports with specified status Allowed values: created,started,finished,failed |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
Start a new offline transfer export
POST /api/v4/offline_exports
Initiates a new offline transfer export. For more information, see https://docs.gitlab.com/user/group/import/offline_transfer_migrations/
Request body (application/json)
| Property | Type | Description |
|---|---|---|
aws_ | Object | AWS S3 object storage configuration |
aws_Required | String | AWS S3 access key ID |
aws_Required | String | AWS S3 secret access key |
aws_ | Boolean | Use path- Default: false |
aws_Required | String | AWS S3 object storage region |
bucketRequired | String | Name of the object storage bucket where export data is stored |
entitiesRequired | Array of objects | List of entities to export |
entities[].Required | String | Relative path of the entity to export Example: 'source/ |
gcs_ | Object | Google Cloud Storage configuration using Application Default Credentials. |
gcs_Required | String | Google Cloud project ID |
gcs_ | Object | Google Cloud Storage configuration using a service account JSON key |
gcs_Required | String | Google Cloud service account JSON key contents |
gcs_Required | String | Google Cloud project ID |
gcs_ | Object | Google Cloud Storage configuration using S3- |
gcs_Required | String | GCS HMAC access key ID |
gcs_Required | String | GCS HMAC secret |
gcs_ | Boolean | Use path- Default: true |
gcs_Required | String | GCS bucket region |
s3_ | Object | Min |
s3_Required | String | S3- |
s3_Required | String | S3- |
s3_Required | String | Object storage location endpoint |
s3_ | Boolean | Use path- Default: true |
s3_Required | String | S3- |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
Get offline transfer export details
GET /api/v4/offline_exports/{id}
Retrieves details of an offline transfer export. For more information, see https://docs.gitlab.com/user/group/import/offline_transfer_migrations/
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | The ID of user’s offline transfer export |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
Start a new offline transfer import
POST /api/v4/offline_imports
Initiates a new offline transfer import from object storage. For more information, see https://docs.gitlab.com/user/group/import/offline_transfer_migrations/
Request body (application/json)
| Property | Type | Description |
|---|---|---|
aws_ | Object | AWS S3 object storage configuration |
aws_Required | String | AWS S3 access key ID |
aws_Required | String | AWS S3 secret access key |
aws_ | Boolean | Use path- Default: false |
aws_Required | String | AWS S3 object storage region |
bucketRequired | String | Name of the object storage bucket where export data is stored |
entities | Array of objects | List of entities to import |
entities[].Required | String | Full path of the destination namespace |
entities[]. | String | Destination slug for the imported entity |
entities[].Required | String | Full path of the entity on the source instance |
entities[].Required | String | Type of the entity to import Allowed values: group_,project_Minimum length: 1 |
export_Required | String | Prefix of the export within the bucket |
gcs_ | Object | Google Cloud Storage configuration using Application Default Credentials. |
gcs_Required | String | Google Cloud project ID |
gcs_ | Object | Google Cloud Storage configuration using a service account JSON key |
gcs_Required | String | Google Cloud service account JSON key contents |
gcs_Required | String | Google Cloud project ID |
gcs_ | Object | Google Cloud Storage configuration using S3- |
gcs_Required | String | GCS HMAC access key ID |
gcs_Required | String | GCS HMAC secret |
gcs_ | Boolean | Use path- Default: true |
gcs_Required | String | GCS bucket region |
import_ | Object | Import every top- |
import_Required | String | Full path of the destination namespace the source structure is recreated under. Example: destination- |
s3_ | Object | Min |
s3_Required | String | S3- |
s3_Required | String | S3- |
s3_Required | String | Object storage location endpoint |
s3_ | Boolean | Use path- Default: true |
s3_Required | String | S3- |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not found | — |
422 | Unprocessable entity | — |
429 | Too many requests | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesBulkImport
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Example:2012- |
has_ | Boolean | Example:false |
id | Integer (int64) | Example:1 |
source_ | String | Example:gitlab |
source_ | String | Example:https: |
status | String | Allowed values:created,started,finished,timeout,failedExample: finished |
updated_ | String (date- | Example:2012- |