- 사전 요구 사항
- 새로운 그룹 또는 프로젝트 마이그레이션 시작
- 모든 그룹 또는 프로젝트 마이그레이션 디렉터리
- 모든 그룹 또는 프로젝트 마이그레이션 엔터티 디렉터리
- 그룹 또는 프로젝트 이전 세부정보 가져오기
- 그룹 또는 프로젝트 이전 엔터티 디렉터리 가져오기
- 그룹 또는 프로젝트 이전 엔터티 세부정보 가져오기
- 그룹 또는 프로젝트 이전 엔터티 실패 가져오기 디렉터리
직접 전송 API에 의한 그룹 및 프로젝트 마이그레이션
Tier: Free, Premium, Ultimate
Offering: GitLab.com, Self-managed, GitLab Dedicated
- GitLab 14.1에서 소개됨.
- 프로젝트 마이그레이션은 GitLab 15.11에서 소개됨.
직접 전송 API를 사용하여 그룹 마이그레이션을 시작하고 진행 상황을 확인할 수 있습니다. group migration by direct transfer로 시작된 마이그레이션을 확인하세요.
이 API를 사용하여 프로젝트를 마이그레이션하는 것은 베타 단계입니다. 이 기능은 아직 제품으로 사용하기에 적합하지 않습니다.
사전 요구 사항
직접 전송 API를 사용하여 그룹 마이그레이션에 필요한 사전 요구 사항에 대한 정보는 직접 전송을 통한 그룹 마이그레이션의 사전 요구 사항을 참조하세요.
새로운 그룹 또는 프로젝트 마이그레이션 시작
- GitLab 14.2에서 소개됨.
project_entity
source type은 GitLab 15.11에서 소개됨.
이 엔드포인트를 사용하여 새로운 그룹 또는 프로젝트 마이그레이션을 시작합니다. 지정하세요:
-
entities[group_entity]
는 그룹을 마이그레이션합니다. -
entities[project_entity]
는 프로젝트를 마이그레이션합니다. (상태: 베타)
POST /bulk_imports
속성 | 타입 | 필수 | 설명 |
---|---|---|---|
configuration
| Hash | 예 | 소스 GitLab 인스턴스 구성. |
configuration[url]
| 문자열 | 예 | 소스 GitLab 인스턴스 URL. |
configuration[access_token]
| 문자열 | 예 | 소스 GitLab 인스턴스에 대한 액세스 토큰. |
entities
| 배열 | 예 | 가져올 엔터티 디렉터리. |
entities[source_type]
| 문자열 | 예 | 소스 엔터티 유형. group_entity (GitLab 14.2부터) 및 project_entity (GitLab 15.11부터)의 유효한 값입니다.
|
entities[source_full_path]
| 문자열 | 예 | 가져올 엔터티의 소스 전체 경로. 예: gitlab-org/gitlab .
|
entities[destination_slug]
| 문자열 | 예 | 엔터티의 대상 슬러그. GitLab은 슬러그를 엔터티의 URL 경로로 사용합니다. 가져온 엔터티의 이름은 슬러그가 아닌 소스 엔터티의 이름을 복사합니다. |
entities[destination_name]
| 문자열 | 아니오 | 사용 금지: 대신 destination_slug 을 사용하세요. 엔터티의 대상 슬러그.
|
entities[destination_namespace]
| 문자열 | 예 | 엔터티의 대상 그룹 네임스페이스의 전체 경로. 대상 인스턴스에서 기존 그룹이어야 합니다. |
entities[migrate_projects]
| 부울 | 아니오 | 그룹 엔터티의 경우 모든 중첩 프로젝트도 가져옵니다 (source_type 이 group_entity 인 경우). 기본값은 true 입니다.
|
curl --request POST --header "PRIVATE-TOKEN: <목적지_gitlab_인스턴스_액세스_토큰>" "https://destination-gitlab-instance.example.com/api/v4/bulk_imports" \
--header "Content-Type: application/json" \
--data '{
"configuration": {
"url": "https://source-gitlab-instance.example.com",
"access_token": "<소스_gitlab_인스턴스_액세스_토큰>"
},
"entities": [
{
"source_full_path": "source/full/path",
"source_type": "group_entity",
"destination_slug": "destination_slug",
"destination_namespace": "destination/namespace/path"
}
]
}'
{ "id": 1, "status": "created", "source_type": "gitlab", "created_at": "2021-06-18T09:45:55.358Z", "updated_at": "2021-06-18T09:46:27.003Z" }
모든 그룹 또는 프로젝트 마이그레이션 디렉터리
GET /bulk_imports
속성 | 타입 | 필수 | 설명 |
---|---|---|---|
per_page
| 정수 | 아니오 | 페이지 당 반환할 레코드 수. |
page
| 정수 | 아니오 | 가져올 페이지. |
sort
| 문자열 | 아니오 | 레코드를 생성 날짜순으로 asc 또는 desc 순으로 반환합니다. 기본값은 desc 입니다.
|
status
| 문자열 | 아니오 | 가져오기 상태. |
상태는 다음 중 하나일 수 있습니다:
created
started
finished
failed
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports?per_page=2&page=1"
[
{
"id": 1,
"status": "finished",
"source_type": "gitlab",
"created_at": "2021-06-18T09:45:55.358Z",
"updated_at": "2021-06-18T09:46:27.003Z"
},
{
"id": 2,
"status": "started",
"source_type": "gitlab",
"created_at": "2021-06-18T09:47:36.581Z",
"updated_at": "2021-06-18T09:47:58.286Z"
}
]
모든 그룹 또는 프로젝트 마이그레이션 엔터티 디렉터리
GET /bulk_imports/entities
속성 | 타입 | 필수 | 설명 |
---|---|---|---|
per_page
| 정수 | 아니오 | 페이지 당 반환할 레코드 수. |
page
| 정수 | 아니오 | 가져올 페이지. |
sort
| 문자열 | 아니오 | 레코드를 생성 날짜순으로 asc 또는 desc 순으로 반환합니다. 기본값은 desc 입니다.
|
status
| 문자열 | 아니오 | 가져오기 상태. |
상태는 다음 중 하나일 수 있습니다:
created
started
finished
failed
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports/entities?per_page=2&page=1&status=started"
[
{
"id": 1,
"bulk_import_id": 1,
"status": "finished",
"source_full_path": "source_group",
"destination_slug": "destination_slug",
"destination_namespace": "destination_path",
"parent_id": null,
"namespace_id": 1,
"project_id": null,
"created_at": "2021-06-18T09:47:37.390Z",
"updated_at": "2021-06-18T09:47:51.867Z",
"failures": [],
"stats": {
"labels": {
"source": 10,
"fetched": 10,
"imported": 10
},
"milestones": {
"source": 10,
"fetched": 10,
"imported": 10
}
}
},
{
"id": 2,
"bulk_import_id": 2,
"status": "failed",
"source_full_path": "another_group",
"destination_slug": "another_slug",
"destination_namespace": "another_namespace",
"parent_id": null,
"namespace_id": null,
"project_id": null,
"created_at": "2021-06-24T10:40:20.110Z",
"updated_at": "2021-06-24T10:40:46.590Z",
"failures": [
{
"relation": "group",
"step": "extractor",
"exception_message": "Error!",
"exception_class": "Exception",
"correlation_id_value": "dfcf583058ed4508e4c7c617bd7f0edd",
"created_at": "2021-06-24T10:40:46.495Z",
"pipeline_class": "BulkImports::Groups::Pipelines::GroupPipeline",
"pipeline_step": "extractor"
}
]
}
]
그룹 또는 프로젝트 이전 세부정보 가져오기
GET /bulk_imports/:id
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports/1"
{
"id": 1,
"status": "finished",
"source_type": "gitlab",
"created_at": "2021-06-18T09:45:55.358Z",
"updated_at": "2021-06-18T09:46:27.003Z"
}
그룹 또는 프로젝트 이전 엔터티 디렉터리 가져오기
GET /bulk_imports/:id/entities
속성 | 타입 | 필수 | 설명 |
---|---|---|---|
per_page
| integer | no | 페이지당 반환할 레코드 수. |
page
| integer | no | 가져올 페이지. |
sort
| string | no | 레코드를 asc 또는 desc 순으로 정렬하여 반환. 기본값은 desc
|
status
| string | no | 가져오려는 레코드의 이전 상태. |
상태는 다음 중 하나일 수 있습니다:
created
started
finished
failed
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports/1/entities?per_page=2&page=1&status=finished"
[
{
"id": 1,
"status": "finished",
"source_type": "gitlab",
"created_at": "2021-06-18T09:45:55.358Z",
"updated_at": "2021-06-18T09:46:27.003Z",
"stats": {
"labels": {
"source": 10,
"fetched": 10,
"imported": 10
},
"milestones": {
"source": 10,
"fetched": 10,
"imported": 10
}
}
}
]
그룹 또는 프로젝트 이전 엔터티 세부정보 가져오기
GET /bulk_imports/:id/entities/:entity_id
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports/1/entities/2"
{
"id": 2,
"status": "finished",
"source_type": "gitlab",
"created_at": "2021-06-18T09:45:55.358Z",
"updated_at": "2021-06-18T09:46:27.003Z"
}
그룹 또는 프로젝트 이전 엔터티 실패 가져오기 디렉터리
- GitLab 16.6에서 도입되었습니다.
GET /bulk_imports/:id/entities/:entity_id/failures
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/bulk_imports/1/entities/2/failures"
{
"relation": "issues",
"exception_message": "Error!",
"exception_class": "StandardError",
"correlation_id_value": "06289e4b064329a69de7bb2d7a1b5a97",
"source_url": "https://gitlab.example/project/full/path/-/issues/1",
"source_title": "Issue title"
}