- 전제 조건
- 새 그룹 또는 프로젝트 이전 시작
- 모든 그룹 또는 프로젝트 이전 목록
- 그룹 또는 프로젝트 마이그레이션 엔티티 모두 나열
- 그룹 또는 프로젝트 마이그레이션 세부정보 가져오기
- 그룹 또는 프로젝트 마이그레이션 엔티티 모두 나열
- 그룹 또는 프로젝트 이전 개체 세부 정보 가져오기
- 그룹 또는 프로젝트 이전 개체에 대한 실패한 가져오기 레코드 목록
직접 전송 API를 사용한 그룹 및 프로젝트 이전
Tier: Free, Premium, Ultimate
Offering: GitLab.com, Self-managed, GitLab Dedicated
- GitLab 14.1에서 소개됨.
- 프로젝트 이전은 GitLab 15.11에서 소개됨.
직접 전송 API를 사용한 그룹 이전을 통해 시작하고 진행 중인 이전 작업을 확인할 수 있습니다. 직접 전송을 통한 그룹 이전으로 초기화된 마이그레이션을 시작하고 진행할 수 있습니다.
이 API를 사용한 프로젝트 이전은 베타 단계입니다. 이 기능은 본격적인 운영에는 준비되지 않았습니다.
전제 조건
직접 전송 API를 사용한 그룹 이전의 전제 조건에 대한 정보는 직접 전송을 통한 그룹 이전의 전제 조건을 참조하십시오.
새 그룹 또는 프로젝트 이전 시작
- GitLab 14.2에서 소개됨.
project_entity
소스 유형은 GitLab 15.11에서 소개됨.
이 엔드포인트를 사용하여 새 그룹 또는 프로젝트 이전을 시작합니다. 다음을 지정하세요:
-
entities[group_entity]
- 그룹을 마이그레이션합니다. -
entities[project_entity]
- 프로젝트를 마이그레이션합니다. (Status: Beta)
POST /bulk_imports
속성 | 유형 | 필요 여부 | 설명 |
---|---|---|---|
configuration
| Hash | 예 | 소스 GitLab 인스턴스 구성 |
configuration[url]
| String | 예 | 소스 GitLab 인스턴스 URL |
configuration[access_token]
| String | 예 | 소스 GitLab 인스턴스에 대한 액세스 토큰 |
entities
| Array | 예 | 가져올 엔터티 목록 |
entities[source_type]
| String | 예 | 소스 엔터티 유형. 유효한 값은 group_entity (GitLab 14.2 이상) 및 project_entity (GitLab 15.11 이상)입니다.
|
entities[source_full_path]
| String | 예 | 가져올 엔터티의 소스 전체 경로. 예: gitlab-org/gitlab .
|
entities[destination_slug]
| String | 예 | 엔터티의 대상 슬러그. GitLab은 슬러그를 엔터티의 URL 경로로 사용합니다. 가져온 엔터티의 이름은 슬러그가 아닌 소스 엔터티의 이름에서 복사됩니다. |
entities[destination_name]
| String | 아니오 | 사용되지 않음: 대신 destination_slug 을 사용하십시오. 엔터티의 대상 슬러그입니다.
|
entities[destination_namespace]
| String | 예 | 엔터티의 대상 그룹 네임스페이스의 전체 경로. 대상 인스턴스의 기존 그룹이어야 합니다. |
entities[migrate_projects]
| Boolean | 아니오 | 그룹 엔터티의 경우 모든 중첩된 프로젝트도 가져오기(소스 유형이 group_entity 인 경우). 기본값은 true 입니다.
|
curl --request POST --header "PRIVATE-TOKEN: <대상 GitLab 인스턴스에 대한 액세스 토큰>" "https://대상-gitlab-인스턴스.example.com/api/v4/bulk_imports" \
--header "Content-Type: application/json" \
--data '{
"configuration": {
"url": "https://소스-gitlab-인스턴스.example.com",
"access_token": "<소스 GitLab 인스턴스에 대한 액세스 토큰>"
},
"entities": [
{
"source_full_path": "소스/전체/경로",
"source_type": "group_entity",
"destination_slug": "대상_슬러그",
"destination_namespace": "대상/네임스페이스/경로"
}
]
}'
{ "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
| integer | 아니오 | 페이지당 반환할 레코드 수 |
page
| integer | 아니오 | 검색할 페이지 |
sort
| string | 아니오 | 생성 날짜별 오름차순 또는 내림차순으로 정렬된 레코드 반환. 기본값은 desc
|
status
| string | 아니오 | 가져오기 상태 |
상태는 다음 중 하나일 수 있습니다:
created
started
finished
failed
curl --request GET --header "PRIVATE-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
| 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/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": "에러!",
"exception_class": "StandardError",
"correlation_id_value": "06289e4b064329a69de7bb2d7a1b5a97",
"source_url": "https://gitlab.example/project/full/path/-/issues/1",
"source_title": "이슈 제목"
}