Epic API
- GitLab Ultimate 10.2에서 도입되었습니다.
- Single-level Epics은 GitLab Premium 12.8에서 이동되었습니다.
에픽에 대한 모든 API 호출은 인증되어야 합니다.
사용자가 비공개 그룹의 구성원이 아닌 경우 해당 그룹에 대한 GET
요청은 404
상태 코드를 반환합니다.
에픽 기능을 사용할 수 없는 경우 403
상태 코드가 반환됩니다.
에픽 이슈 API
에픽 이슈 API를 사용하면 에픽과 관련된 이슈와 상호 작용할 수 있습니다.
마일스톤 날짜 통합
- GitLab 11.3에서 도입되었습니다.
시작 날짜와 마감 날짜는 관련된 이슈 마일스톤에서 동적으로 가져올 수 있기 때문에 사용자에게 편집 권한이 있는 경우 추가 필드가 표시됩니다. 이러한 필드에는 두 개의 부울 필드 start_date_is_fixed
와 due_date_is_fixed
가 포함되며, 네 개의 날짜 필드인 start_date_fixed
, start_date_from_inherited_source
, due_date_fixed
, 및 due_date_from_inherited_source
가 포함됩니다.
-
end_date
은due_date
대신에 사용되도록 표시되었습니다. -
start_date_from_milestones
은start_date_from_inherited_source
로 대체되도록 표시되었습니다. -
due_date_from_milestones
은due_date_from_inherited_source
로 대체되도록 표시되었습니다.
에픽 페이지네이션
기본적으로 GET
요청은 API 결과를 페이지별로 20개씩 반환합니다.
자세한 내용은 페이지네이션을 참조하세요.
경고:
GitLab 12.6 이후에는 응답의 reference
속성이 references
로 대체되었습니다.
참고:
references.relative
은 에픽을 요청한 그룹과 관련이 있습니다. 에픽이 원본 그룹에서 가져온 경우, relative
형식은 short
형식과 동일합니다.
에픽이 그룹을 건너서 요청된 경우, relative
형식은 full
형식과 동일하게 나올 것으로 예상됩니다.
그룹에 대한 에픽 목록
- 응답의
parent_iid
및_links[parent]
는 GitLab 14.6에 도입되었습니다.
요청된 그룹 및 해당 하위 그룹의 모든 에픽을 가져옵니다.
GET /groups/:id/epics
GET /groups/:id/epics?author_id=5
GET /groups/:id/epics?labels=bug,reproduced
GET /groups/:id/epics?state=opened
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer/string | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL 인코딩 된 경로 |
author_id
| integer | 아니오 | 지정된 사용자id 가 만든 에픽을 반환합니다.
|
author_username
| string | 아니오 | 지정된 username 을 가진 사용자가 만든 에픽을 반환합니다. GitLab 14.7 및 이후 버전에서 사용 가능
|
labels
| string | 아니오 | 쉼표로 구분된 레이블 이름 목록과 일치하는 에픽을 반환합니다. 에픽 그룹이나 상위 그룹의 레이블 이름을 사용할 수 있습니다. |
with_labels_details
| boolean | 아니오 |
true 로 설정하면 응답에서 레이블 필드의 각 레이블에 대해 더 많은 세부 정보를 반환합니다. :name , :color , :description , :description_html , :text_color . 기본값은 false 입니다. GitLab 12.7 및 이후 버전에서 사용 가능
|
order_by
| string | 아니오 | 에픽을 created_at , updated_at , 또는 title 필드로 정렬하여 반환합니다. 기본값은 created_at 입니다.
|
sort
| string | 아니오 | 에픽을 asc 또는 desc 순서로 반환합니다. 기본값은 desc 입니다.
|
search
| string | 아니오 | 에픽의 title 및 description 에 대해 검색합니다.
|
state
| string | 아니오 | 에픽의 state 에 대해 검색합니다. 가능한 필터: opened , closed 및 all , 기본값은 all 입니다.
|
created_after
| datetime | 아니오 | 지정된 시간 이후에 만들어진 에픽을 반환합니다. ISO 8601 형식(2019-03-15T08:00:00Z )으로 입력해야 합니다.
|
created_before
| datetime | 아니오 | 지정된 시간 이전에 만들어진 에픽을 반환합니다. ISO 8601 형식(2019-03-15T08:00:00Z )으로 입력해야 합니다.
|
updated_after
| datetime | 아니오 | 지정된 시간 이후에 업데이트된 에픽을 반환합니다. ISO 8601 형식(2019-03-15T08:00:00Z )으로 입력해야 합니다.
|
updated_before
| datetime | 아니오 | 지정된 시간 이전에 업데이트된 에픽을 반환합니다. ISO 8601 형식(2019-03-15T08:00:00Z )으로 입력해야 합니다.
|
include_ancestor_groups
| boolean | 아니오 | 요청받은 그룹의 선조에서 에픽을 포함합니다. 기본값은 false 입니다.
|
include_descendant_groups
| boolean | 아니오 | 요청받은 그룹의 자손에서 에픽을 포함합니다. 기본값은 true 입니다.
|
my_reaction_emoji
| string | 아니오 | 주어진 이모지로 인증된 사용자가 반응한 에픽을 반환합니다. None 은 반응이 없는 에픽을 반환합니다. Any 는 최소한 하나의 반응이 있는 에픽을 반환합니다. GitLab 13.0 및 이후 버전에서 사용 가능
|
not
| Hash | 아니오 | 제공된 매개변수와 일치하지 않는 에픽을 반환합니다. author_id , author_username (GitLab 14.7 및 이후 버전) 및 labels 를 전달할 수 있습니다. GitLab 14.6 및 이후 버전에서 사용 가능
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics"
예시 응답:
[
{
"id": 29,
"iid": 4,
"group_id": 7,
"parent_id": 23,
"parent_iid": 3,
"title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
"confidential": "false",
"web_url": "http://gitlab.example.com/groups/test/-/epics/4",
"reference": "&4",
"references": {
"short": "&4",
"relative": "&4",
"full": "test&4"
},
"author": {
"id": 10,
"name": "Lu Mayer",
"username": "kam",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80&d=identicon",
"web_url": "http://gitlab.example.com/kam"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
"downvotes": 0,
"color": "#1068bf",
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/4",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/4/issues",
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent":"http://gitlab.example.com/api/v4/groups/7/epics/3"
}
},
{
"id": 50,
"iid": 35,
"group_id": 17,
"parent_id": 19,
"parent_iid": 1,
"title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
"web_url": "http://gitlab.example.com/groups/test/sample/-/epics/35",
"reference": "&4",
"references": {
"short": "&4",
"relative": "sample&4",
"full": "test/sample&4"
},
"author": {
"id": 10,
"name": "Lu Mayer",
"username": "kam",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80&d=identicon",
"web_url": "http://gitlab.example.com/kam"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
"downvotes": 0,
"color": "#1068bf",
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/17/epics/35",
"epic_issues": "http://gitlab.example.com/api/v4/groups/17/epics/35/issues",
"group":"http://gitlab.example.com/api/v4/groups/17",
"parent":"http://gitlab.example.com/api/v4/groups/17/epics/1"
}
}
]
단일 epic
parent_iid
와 응답에서_links[parent]
은 GitLab 14.6에서 소개되었습니다.
단일 epic을 가져옵니다.
GET /groups/:id/epics/:epic_iid
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL-인코딩된 경로 |
epic_iid
| 정수/문자열 | 예 | epic의 내부 ID. |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics/5"
예시 응답:
{
"id": 30,
"iid": 5,
"group_id": 7,
"parent_id": null,
"parent_iid": null,
"title": "Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
"web_url": "http://gitlab.example.com/groups/test/-/epics/5",
"reference": "&5",
"references": {
"short": "&5",
"relative": "&5",
"full": "test&5"
},
"author":{
"id": 7,
"name": "Pamella Huel",
"username": "arnita",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80&d=identicon",
"web_url": "http://gitlab.example.com/arnita"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, // deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", // deprecated in favor of due_date
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", // deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
"downvotes": 0,
"color": "#1068bf",
"subscribed": true,
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/5",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/5/issues",
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent": null
}
}
새로운 Epic
- 응답에서
parent_iid
와_links[parent]
은 GitLab 14.6에서 소개되었습니다.
새로운 epic을 생성합니다.
참고:
GitLab 11.3부터 start_date
및 end_date
는 이제 복합 값을 나타내므로 직접 할당되지 않아야 합니다. 대신 *_is_fixed
및 *_fixed
필드를 통해 구성할 수 있습니다.
POST /groups/:id/epics
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL-인코딩된 경로 |
title
| 문자열 | 예 | Epic의 제목 |
labels
| 문자열 | 아니오 | 레이블의 쉼표로 구분된 목록 |
description
| 문자열 | 아니오 | Epic의 설명. 1,048,576자로 제한됨. |
color
| 문자열 | 아니오 | Epic의 색상. 기능 플래그 인 epic_highlight_color (기본값으로 비활성화)로 소개됨 (GitLab 14.8에서)
|
confidential
| 불리언 | 아니오 | Epic이 비밀인지 여부 |
created_at
| 문자열 | 아니오 | Epic이 생성된 날짜 및 시간. 예: 2016-03-11T03:45:40Z . 관리자 또는 프로젝트/그룹 소유자 권한이 필요합니다 (사용 가능한 기능)(GitLab 13.5부터)
|
start_date_is_fixed
| 불리언 | 아니오 | 시작 날짜가 start_date_fixed 또는 마일스톤에서 가져와야 하는지의 여부 (GitLab 11.3이후)
|
start_date_fixed
| 문자열 | 아니오 | Epic의 고정된 시작 날짜 (GitLab 11.3이후) |
due_date_is_fixed
| 불리언 | 아니오 | 완료 날짜가 due_date_fixed 또는 마일스톤에서 가져와야 하는지의 여부 (GitLab 11.3이후)
|
due_date_fixed
| 문자열 | 아니오 | Epic의 고정된 완료 날짜 (GitLab 11.3이후) |
parent_id
| 정수/문자열 | 아니오 | 부모 epic의 ID (GitLab 11.11이후) |
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics?title=Epic&description=Epic%20description&parent_id=29"
예시 응답:
{
"id": 33,
"iid": 6,
"group_id": 7,
"parent_id": 29,
"parent_iid": 4,
"title": "Epic",
"description": "Epic description",
"state": "opened",
"confidential": "false",
"web_url": "http://gitlab.example.com/groups/test/-/epics/6",
"reference": "&6",
"references": {
"short": "&6",
"relative": "&6",
"full": "test&6"
},
"author": {
"name" : "Alexandra Bashirian",
"avatar_url" : null,
"state" : "active",
"web_url" : "https://gitlab.example.com/eileen.lowe",
"id" : 18,
"username" : "eileen.lowe"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, // deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", // deprecated in favor of due_date
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", // deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
"downvotes": 0,
"color": "#1068bf",
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/6",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/6/issues",
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent": "http://gitlab.example.com/api/v4/groups/7/epics/4"
}
}
Epic 업데이트
- 응답의
parent_iid
및_links[parent]
는 GitLab 14.6에서 도입되었습니다.
Epic을 업데이트합니다.
참고:
GitLab 11.3부터 start_date
및 end_date
는 이제 복합 값으로 나타나므로 직접 할당하지 않아야 합니다. 대신 *_is_fixed
및 *_fixed
필드를 통해 구성할 수 있습니다.
PUT /groups/:id/epics/:epic_iid
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer/string | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL-encoded path |
epic_iid
| integer/string | 예 | Epic의 내부 ID |
add_labels
| string | 아니요 | 이슈에 추가할 쉼표로 구분된 라벨 이름 |
confidential
| boolean | 아니요 | Epic이 비밀로 처리되어야 하는지 여부 |
description
| string | 아니요 | Epic의 설명. 1,048,576 자까지 제한됨. |
due_date_fixed
| string | 아니요 | Epic의 고정된 만료일(11.3 이상의 GitLab) |
due_date_is_fixed
| boolean | 아니요 | 만료일은 due_date_fixed 에서 가져와야 하는지 또는 마일스톤에서 가져와야 하는지 여부 (11.3 이상의 GitLab)
|
labels
| string | 아니요 | 이슈에 대한 쉼표로 구분된 라벨 이름. 모든 라벨을 해제하려면 빈 문자열로 설정합니다. |
parent_id
| integer/string | 아니요 | 부모 Epic의 ID. GitLab 14.6 이후에 사용 가능 |
remove_labels
| string | 아니요 | 이슈에서 제거할 쉼표로 구분된 라벨 이름 |
start_date_fixed
| string | 아니요 | Epic의 고정된 시작일 (11.3 이상의 GitLab) |
start_date_is_fixed
| boolean | 아니요 | 시작일은 start_date_fixed 에서 가져와야 하는지 또는 마일스톤에서 가져와야 하는지 여부 (11.3 이상의 GitLab)
|
state_event
| string | 아니요 | Epic의 상태 이벤트. Epic을 닫으려면 close 를 설정하고, 다시 열기 위해서는 reopen 을 설정합니다 (11.4 이상의 GitLab)
|
title
| string | 아니요 | Epic의 제목 |
updated_at
| string | 아니요 | Epic의 업데이트 시간. ISO 8601 형식의 날짜 및 시간 문자열, 예: 2016-03-11T03:45:40Z . 관리자 또는 프로젝트/그룹 소유자 권한이 필요함 (GitLab 13.5 이상에서 사용 가능)
|
color
| string | 아니요 | Epic의 색상. 기본적으로 비활성화된 기능 플래그인 epic_highlight_color 에 의해 GitLab 14.8에서 도입됨
|
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title&parent_id=29"
예시 응답:
{
"id": 33,
"iid": 6,
"group_id": 7,
"parent_id": 29,
"parent_iid": 4,
"title": "새 제목",
"description": "Epic 설명",
"state": "opened",
"confidential": "false",
"web_url": "http://gitlab.example.com/groups/test/-/epics/6",
"reference": "&6",
"references": {
"short": "&6",
"relative": "&6",
"full": "test&6"
},
"author": {
"name" : "Alexandra Bashirian",
"avatar_url" : null,
"state" : "active",
"web_url" : "https://gitlab.example.com/eileen.lowe",
"id" : 18,
"username" : "eileen.lowe"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, // start_date_from_inherited_source로 대체됨
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", // due_date로 대체됨
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", // start_date_from_inherited_source로 대체됨
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
"downvotes": 0,
"color": "#1068bf"
}
Epic 삭제
에픽을 삭제합니다
DELETE /groups/:id/epics/:epic_iid
속성 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL-인코딩된 경로 |
epic_iid
| 정수/문자열 | 예 | 에픽의 내부 ID. |
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics/5"
할 일 항목 생성
현재 사용자를 위해 에픽에 수동으로 할 일 항목을 생성합니다. 사용자에게 이미 해당 에픽에 대한 할 일 항목이 있는 경우, 상태 코드 304
가 반환됩니다.
POST /groups/:id/epics/:epic_iid/todo
속성 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 그룹의 ID 또는 URL-인코딩된 경로 |
epic_iid
| 정수 | 예 | 그룹의 에픽의 내부 ID |
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/epics/5/todo"
예시 응답:
{
"id": 112,
"group": {
"id": 1,
"name": "Gitlab",
"path": "gitlab",
"kind": "group",
"full_path": "base/gitlab",
"parent_id": null
},
"author": {
"name": "Administrator",
"username": "root",
"id": 1,
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"web_url": "https://gitlab.example.com/root"
},
"action_name": "marked",
"target_type": "epic",
"target": {
"id": 30,
"iid": 5,
"group_id": 1,
"title": "Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"author":{
"id": 7,
"name": "Pamella Huel",
"username": "arnita",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80&d=identicon",
"web_url": "http://gitlab.example.com/arnita"
},
"web_url": "http://gitlab.example.com/groups/test/-/epics/5",
"reference": "&5",
"references": {
"short": "&5",
"relative": "&5",
"full": "test&5"
},
"start_date": null,
"end_date": null,
"created_at": "2018-01-21T06:21:13.165Z",
"updated_at": "2018-01-22T12:41:41.166Z",
"closed_at": "2018-08-18T12:22:05.239Z"
},
"target_url": "https://gitlab.example.com/groups/epics/5",
"body": "Vel voluptas atque dicta mollitia adipisci qui at.",
"state": "pending",
"created_at": "2016-07-01T11:09:13.992Z"
}