연결된 에픽 API

Tier: Ultimate Offering: GitLab.com, Self-Managed, GitLab Dedicated

만약 관련된 에픽 기능이 GitLab 계획에서 사용할 수 없는 경우 403 상태 코드가 반환됩니다.

그룹에서 관련된 에픽 링크 디렉터리

주어진 그룹 내 및 하위 그룹에서 사용자 권한에 따라 필터링된 주어진 그룹의 관련된 에픽 링크 디렉터리을 가져옵니다. 사용자는 관련된 에픽 링크에 액세스하기 위해 source_epictarget_epic에 액세스 할 수 있어야 합니다.

GET /groups/:id/related_epic_links

지원되는 속성:

속성 유형 필수 설명
id integer/string 그룹의 ID 또는 URL-인코딩 된 경로.
created_after string 아니요 지정된 시간 이후에 생성된 관련 에픽 링크를 반환합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)
created_before string 아니요 지정된 시간 이전에 생성된 관련 에픽 링크를 반환합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)
updated_after string 아니요 지정된 시간 이후에 업데이트된 관련 에픽 링크를 반환합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)
updated_before string 아니요 지정된 시간 이전에 업데이트된 관련 에픽 링크를 반환합니다. 형식: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)

예제 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/related_epic_links"

예제 응답:

[
  {
    "id": 1,
    "created_at": "2022-01-31T15:10:44.988Z",
    "updated_at": "2022-01-31T15:10:44.988Z",
    "link_type": "relates_to",
    "source_epic": {
      "id": 21,
      "iid": 1,
      "color": "#1068bf",
      "text_color": "#FFFFFF",
      "group_id": 26,
      ...
    },
    "target_epic": {
      "id": 25,
      "iid": 5,
      "color": "#1068bf",
      "text_color": "#FFFFFF",
      "group_id": 26,
      ...
    }
  }
]

에픽에서 연결된 에픽 디렉터리

사용자 권한에 따라 필터링된 주어진 에픽의 연결된 에픽 디렉터리을 가져옵니다.

GET /groups/:id/epics/:epic_iid/related_epics

지원되는 속성:

속성 유형 필수 설명
epic_iid integer 그룹의 에픽의 내부 ID
id integer/string 그룹의 ID 또는 URL-인코딩 된 경로.

예제 요청:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/epics/:epic_iid/related_epics"

예제 응답:

[
   {
      "id":2,
      "iid":2,
      "color":"#1068bf",
      "text_color":"#FFFFFF",
      "group_id":2,
      ...
   }
]

관련 이픽 링크 생성

  • GitLab 15.8에서 그룹의 최소 필요 역할이 리포터에서 게스트로 변경되었습니다.

두 개의 Epic 간에 양방향 관계를 만듭니다. 사용자는 두 그룹 모두에 대해 최소한 게스트 역할이 있어야 합니다.

POST /groups/:id/epics/:epic_iid/related_epics

지원되는 속성:

속성 유형 필수 여부 설명
epic_iid 정수 그룹 Epic의 내부 ID
id 정수/문자열 인증된 사용자가 소유한 그룹의 ID 또는 URL 인코딩된 경로
target_epic_iid 정수/문자열 대상 그룹 Epic의 내부 ID
target_group_id 정수/문자열 대상 그룹의 ID 또는 URL 인코딩된 경로
link_type 문자열 아니요 관계 유형(relates_to, blocks, is_blocked_by). 기본값은 relates_to입니다.

예시 요청:

curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/26/epics/1/related_epics?target_group_id=26&target_epic_iid=5"

예시 응답:

{
  "id": 1,
  "created_at": "2022-01-31T15:10:44.988Z",
  "updated_at": "2022-01-31T15:10:44.988Z",
  "link_type": "relates_to",
  "source_epic": {
    "id": 21,
    "iid": 1,
    "color": "#1068bf",
    "text_color": "#FFFFFF",
    "group_id": 26,
    "parent_id": null,
    "parent_iid": null,
    "title": "Aspernatur recusandae distinctio omnis et qui est iste.",
    "description": "some description",
    "confidential": false,
    "author": {
      "id": 15,
      "username": "trina",
      "name": "Theresia Robel",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/085e28df717e16484cbf6ceca75e9a93?s=80&d=identicon",
      "web_url": "http://gitlab.example.com/trina"
    },
    "start_date": null,
    "end_date": null,
    "due_date": null,
    "state": "opened",
    "web_url": "http://gitlab.example.com/groups/flightjs/-/epics/1",
    "references": {
      "short": "&1",
      "relative": "&1",
      "full": "flightjs&1"
    },
    "created_at": "2022-01-31T15:10:44.988Z",
    "updated_at": "2022-03-16T09:32:35.712Z",
    "closed_at": null,
    "labels": [],
    "upvotes": 0,
    "downvotes": 0,
    "_links": {
      "self": "http://gitlab.example.com/api/v4/groups/26/epics/1",
      "epic_issues": "http://gitlab.example.com/api/v4/groups/26/epics/1/issues",
      "group": "http://gitlab.example.com/api/v4/groups/26",
      "parent": null
    }
  },
  "target_epic": {
    "id": 25,
    "iid": 5,
    "color": "#1068bf",
    "text_color": "#FFFFFF",
    "group_id": 26,
    "parent_id": null,
    "parent_iid": null,
    "title": "Aut assumenda id nihil distinctio fugiat vel numquam est.",
    "description": "some description",
    "confidential": false,
    "author": {
      "id": 3,
      "username": "valerie",
      "name": "Erika Wolf",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/9ef7666abb101418a4716a8ed4dded80?s=80&d=identicon",
      "web_url": "http://gitlab.example.com/valerie"
    },
    "start_date": null,
    "end_date": null,
    "due_date": null,
    "state": "opened",
    "web_url": "http://gitlab.example.com/groups/flightjs/-/epics/5",
    "references": {
      "short": "&5",
      "relative": "&5",
      "full": "flightjs&5"
    },
    "created_at": "2022-01-31T15:10:45.080Z",
    "updated_at": "2022-03-16T09:32:35.842Z",
    "closed_at": null,
    "labels": [],
    "upvotes": 0,
    "downvotes": 0,
    "_links": {
      "self": "http://gitlab.example.com/api/v4/groups/26/epics/5",
      "epic_issues": "http://gitlab.example.com/api/v4/groups/26/epics/5/issues",
      "group": "http://gitlab.example.com/api/v4/groups/26",
      "parent": null
    }
  }
}

관련 이픽 링크 삭제

  • GitLab 15.8에서 그룹의 최소 필요 역할이 리포터에서 게스트로 변경되었습니다.

두 개의 Epic 간에 양방향 관계를 삭제합니다. 사용자는 두 그룹 모두에 대해 최소한 게스트 역할이 있어야 합니다.

DELETE /groups/:id/epics/:epic_iid/related_epics/:related_epic_link_id

지원되는 속성:

속성 유형 필수 여부 설명
epic_iid 정수 그룹 Epic의 내부 ID
id 정수/문자열 인증된 사용자가 소유한 그룹의 ID 또는 URL 인코딩된 경로
related_epic_link_id 정수/문자열 관련된 Epic 링크의 내부 ID

예시 요청:

curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/26/epics/1/related_epics/1"

예시 응답:

{
  "id": 1,
  "created_at": "2022-01-31T15:10:44.988Z",
  "updated_at": "2022-01-31T15:10:44.988Z",
  "link_type": "relates_to",
  "source_epic": {
    "id": 21,
    "iid": 1,
    "color": "#1068bf",
    "text_color": "#FFFFFF",
    "group_id": 26,
    "parent_id": null,
    "parent_iid": null,
    "title": "Aspernatur recusandae distinctio omnis et qui est iste.",
    "description": "some description",
    "confidential": false,
    "author": {
      "id": 15,
      "username": "trina",
      "name": "Theresia Robel",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/085e28df717e16484cbf6ceca75e9a93?s=80&d=identicon",
      "web_url": "http://gitlab.example.com/trina"
    },
    "start_date": null,
    "end_date": null,
    "due_date": null,
    "state": "opened",
    "web_url": "http://gitlab.example.com/groups/flightjs/-/epics/1",
    "references": {
      "short": "&1",
      "relative": "&1",
      "full": "flightjs&1"
    },
    "created_at": "2022-01-31T15:10:44.988Z",
    "updated_at": "2022-03-16T09:32:35.712Z",
    "closed_at": null,
    "labels": [],
    "upvotes": 0,
    "downvotes": 0,
    "_links": {
      "self": "http://gitlab.example.com/api/v4/groups/26/epics/1",
      "epic_issues": "http://gitlab.example.com/api/v4/groups/26/epics/1/issues",
      "group": "http://gitlab.example.com/api/v4/groups/26",
      "parent": null
    }
  },
  "target_epic": {
    "id": 25,
    "iid": 5,
    "color": "#1068bf",
    "text_color": "#FFFFFF",
    "group_id": 26,
    "parent_id": null,
    "parent_iid": null,
    "title": "Aut assumenda id nihil distinctio fugiat vel numquam est.",
    "description": "some description",
    "confidential": false,
    "author": {
      "id": 3,
      "username": "valerie",
      "name": "Erika Wolf",
      "state": "active",
      "avatar_url": "https://www.gravatar.com/avatar/9ef7666abb101418a4716a8ed4dded80?s=80&d=identicon",
      "web_url": "http://gitlab.example.com/valerie"
    },
    "start_date": null,
    "end_date": null,
    "due_date": null,
    "state": "opened",
    "web_url": "http://gitlab.example.com/groups/flightjs/-/epics/5",
    "references": {
      "short": "&5",
      "relative": "&5",
      "full": "flightjs&5"
    },
    "created_at": "2022-01-31T15:10:45.080Z",
    "updated_at": "2022-03-16T09:32:35.842Z",
    "closed_at": null,
    "labels": [],
    "upvotes": 0,
    "downvotes": 0,
    "_links": {
      "self": "http://gitlab.example.com/api/v4/groups/26/epics/5",
      "epic_issues": "http://gitlab.example.com/api/v4/groups/26/epics/5/issues",
      "group": "http://gitlab.example.com/api/v4/groups/26",
      "parent": null
    }
  }
}