프로젝트 관계 내보내기 API

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-Managed, GitLab Dedicated
  • GitLab 15.8에 소개된 새로운 애플리케이션 설정 ‘bulk_import_enabled’. ‘bulk_import’ 피처 플래그가 삭제됨.

프로젝트 관계 내보내기 API는 주로 그룹 이관에서 사용되며, 프로젝트 가져오기 및 내보내기 API와 함께 사용할 수 없습니다.

새로운 내보내기 일정

새로운 프로젝트 관계 내보내기를 시작하세요:

POST /projects/:id/export_relations
속성 유형 필요 여부 설명
id 정수/문자열 인증된 사용자가 소유한 프로젝트의 ID.
batched 부울 아니오 일괄 처리로 내보내기 할지 여부.
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/export_relations"
{
  "message": "202 Accepted"
}

내보내기 상태

관계 내보내기 상태를 확인하세요:

GET /projects/:id/export_relations/status
속성 유형 필요 여부 설명
id 정수/문자열 인증된 사용자가 소유한 프로젝트의 ID.
relation 문자열 아니오 확인할 프로젝트 상위 관계의 이름.
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" \
     "https://gitlab.example.com/api/v4/projects/1/export_relations/status"

다음 중 하나의 상태일 수 있습니다:

  • 0 - 시작됨
  • 1 - 완료됨
  • -1 - 실패함
[
  {
    "relation": "project_badges",
    "status": 1,
    "error": null,
    "updated_at": "2021-05-04T11:25:20.423Z",
    "batched": true,
    "batches_count": 1,
    "batches": [
      {
        "status": 1,
        "batch_number": 1,
        "objects_count": 1,
        "error": null,
        "updated_at": "2021-05-04T11:25:20.423Z"
      }
    ]
  },
  {
    "relation": "boards",
    "status": 1,
    "error": null,
    "updated_at": "2021-05-04T11:25:20.085Z",
    "batched": false,
    "batches_count": 0
  }
]

내보내기 다운로드

완료된 관계 내보내기를 다운로드하세요:

GET /projects/:id/export_relations/download
속성 유형 필요 여부 설명
id 정수/문자열 인증된 사용자가 소유한 프로젝트의 ID.
relation 문자열 다운로드할 프로젝트 상위 관계의 이름.
batched 부울 아니오 내보내기가 일괄 처리되었는지 여부.
batch_number 정수 아니오 다운로드할 내보내기 일괄 처리 번호.
curl --header "PRIVATE-TOKEN: <your_access_token>" --remote-header-name \
     --remote-name "https://gitlab.example.com/api/v4/projects/1/export_relations/download?relation=labels"
ls labels.ndjson.gz
labels.ndjson.gz

관련 주제