InfoGrab DocsInfoGrab Docs

그룹 레이블 API

요약

이 API로 그룹 레이블을 관리합니다. 프로젝트 레이블은 프로젝트 레이블 API를 사용합니다. 지정한 그룹의 모든 레이블을 가져옵니다. 지정한 그룹의 단일 레이블을 가져옵니다. 지정한 그룹에 새 그룹 레이블을 생성합니다. 기존 그룹 레이블을 수정합니다.

히스토리

이 API로 그룹 레이블을 관리합니다.

프로젝트 레이블은 프로젝트 레이블 API를 사용합니다.

그룹 레이블 목록 조회#

지정한 그룹의 모든 레이블을 가져옵니다.

GET /groups/:id/labels
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로.
with_counts boolean 아니요 이슈 및 머지 리퀘스트 개수를 포함할지 여부입니다. 기본값은 false 입니다.
include_ancestor_groups boolean 아니요 상위 그룹을 포함합니다. 기본값은 true 입니다.
include_descendant_groups boolean 아니요 하위 그룹을 포함합니다. 기본값은 false 입니다.
only_group_labels boolean 아니요 그룹 레이블만 포함할지 프로젝트 레이블도 함께 포함할지 전환합니다. 기본값은 true 입니다.
search string 아니요 레이블을 필터링할 키워드입니다.
archived boolean 아니요 true 이면 보관된 레이블만 반환합니다. 설정하지 않으면 모든 레이블을 반환합니다.
curl \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels?with_counts=true"

응답 예시:

[
  {
    "id": 7,
    "name": "bug",
    "color": "#FF0000",
    "text_color" : "#FFFFFF",
    "description": null,
    "description_html": null,
    "open_issues_count": 0,
    "closed_issues_count": 0,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "archived": false
  },
  {
    "id": 4,
    "name": "feature",
    "color": "#228B22",
    "text_color" : "#FFFFFF",
    "description": null,
    "description_html": null,
    "open_issues_count": 0,
    "closed_issues_count": 0,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "archived": false
  }
]

단일 그룹 레이블 조회#

지정한 그룹의 단일 레이블을 가져옵니다.

GET /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로.
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
include_ancestor_groups boolean 아니요 상위 그룹을 포함합니다. 기본값은 true 입니다.
include_descendant_groups boolean 아니요 하위 그룹을 포함합니다. 기본값은 false 입니다.
only_group_labels boolean 아니요 그룹 레이블만 포함할지 프로젝트 레이블도 함께 포함할지 전환합니다. 기본값은 true 입니다.
curl \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/bug"

응답 예시:

{
  "id": 7,
  "name": "bug",
  "color": "#FF0000",
  "text_color" : "#FFFFFF",
  "description": null,
  "description_html": null,
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}

새 그룹 레이블 생성#

지정한 그룹에 새 그룹 레이블을 생성합니다.

POST /groups/:id/labels
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
name string 예 레이블의 이름
color string 예 '#' 로 시작하는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블 색상
description string 아니요 레이블의 설명입니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Feature Proposal",
    "color": "#FFA500",
    "description": "Describes new ideas"
  }' \
  --url "https://gitlab.example.com/api/v4/groups/5/labels"

응답 예시:

{
  "id": 9,
  "name": "Feature Proposal",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}

그룹 레이블 수정#

기존 그룹 레이블을 수정합니다. 그룹 레이블을 수정하려면 파라미터가 최소 하나 필요합니다.

PUT /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
new_name string 아니요 레이블의 새 이름
color string 아니요 '#' 로 시작하는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블 색상
description string 아니요 레이블의 설명입니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --data '{"new_name": "Feature Idea"}' \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/Feature%20Proposal"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}
Note

파라미터에 name을 사용하는 이전 엔드포인트 PUT /groups/:id/labels도 계속 제공되지만 사용 중단되었습니다.

그룹 레이블 삭제#

지정한 이름의 그룹 레이블을 삭제합니다.

DELETE /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request DELETE \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/bug"
Note

파라미터에 name을 사용하는 이전 엔드포인트 DELETE /groups/:id/labels도 계속 제공되지만 사용 중단되었습니다.

그룹 레이블 구독#

인증된 사용자가 알림을 받도록 그룹 레이블을 구독합니다. 사용자가 이미 해당 레이블을 구독하고 있으면 상태 코드 304를 반환합니다.

POST /groups/:id/labels/:label_id/subscribe
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/9/subscribe"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": true,
  "archived": false
}

그룹 레이블 구독 해제#

인증된 사용자가 그룹 레이블의 알림을 받지 않도록 구독을 해제합니다. 사용자가 해당 레이블을 구독하고 있지 않으면 상태 코드 304를 반환합니다.

POST /groups/:id/labels/:label_id/unsubscribe
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/9/unsubscribe"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}

그룹 레이블 API

GitLab v19.5
Tier: Free, Premium, Ultimate
Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
원문 보기

요약

이 API로 그룹 레이블을 관리합니다. 프로젝트 레이블은 프로젝트 레이블 API를 사용합니다. 지정한 그룹의 모든 레이블을 가져옵니다. 지정한 그룹의 단일 레이블을 가져옵니다. 지정한 그룹에 새 그룹 레이블을 생성합니다. 기존 그룹 레이블을 수정합니다.

히스토리

이 API로 그룹 레이블을 관리합니다.

프로젝트 레이블은 프로젝트 레이블 API를 사용합니다.

그룹 레이블 목록 조회#

지정한 그룹의 모든 레이블을 가져옵니다.

GET /groups/:id/labels
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로.
with_counts boolean 아니요 이슈 및 머지 리퀘스트 개수를 포함할지 여부입니다. 기본값은 false 입니다.
include_ancestor_groups boolean 아니요 상위 그룹을 포함합니다. 기본값은 true 입니다.
include_descendant_groups boolean 아니요 하위 그룹을 포함합니다. 기본값은 false 입니다.
only_group_labels boolean 아니요 그룹 레이블만 포함할지 프로젝트 레이블도 함께 포함할지 전환합니다. 기본값은 true 입니다.
search string 아니요 레이블을 필터링할 키워드입니다.
archived boolean 아니요 true 이면 보관된 레이블만 반환합니다. 설정하지 않으면 모든 레이블을 반환합니다.
curl \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels?with_counts=true"

응답 예시:

[
  {
    "id": 7,
    "name": "bug",
    "color": "#FF0000",
    "text_color" : "#FFFFFF",
    "description": null,
    "description_html": null,
    "open_issues_count": 0,
    "closed_issues_count": 0,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "archived": false
  },
  {
    "id": 4,
    "name": "feature",
    "color": "#228B22",
    "text_color" : "#FFFFFF",
    "description": null,
    "description_html": null,
    "open_issues_count": 0,
    "closed_issues_count": 0,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "archived": false
  }
]

단일 그룹 레이블 조회#

지정한 그룹의 단일 레이블을 가져옵니다.

GET /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로.
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
include_ancestor_groups boolean 아니요 상위 그룹을 포함합니다. 기본값은 true 입니다.
include_descendant_groups boolean 아니요 하위 그룹을 포함합니다. 기본값은 false 입니다.
only_group_labels boolean 아니요 그룹 레이블만 포함할지 프로젝트 레이블도 함께 포함할지 전환합니다. 기본값은 true 입니다.
curl \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/bug"

응답 예시:

{
  "id": 7,
  "name": "bug",
  "color": "#FF0000",
  "text_color" : "#FFFFFF",
  "description": null,
  "description_html": null,
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}

새 그룹 레이블 생성#

지정한 그룹에 새 그룹 레이블을 생성합니다.

POST /groups/:id/labels
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
name string 예 레이블의 이름
color string 예 '#' 로 시작하는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블 색상
description string 아니요 레이블의 설명입니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Feature Proposal",
    "color": "#FFA500",
    "description": "Describes new ideas"
  }' \
  --url "https://gitlab.example.com/api/v4/groups/5/labels"

응답 예시:

{
  "id": 9,
  "name": "Feature Proposal",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}

그룹 레이블 수정#

기존 그룹 레이블을 수정합니다. 그룹 레이블을 수정하려면 파라미터가 최소 하나 필요합니다.

PUT /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
new_name string 아니요 레이블의 새 이름
color string 아니요 '#' 로 시작하는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블 색상
description string 아니요 레이블의 설명입니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --header "Content-Type: application/json" \
  --data '{"new_name": "Feature Idea"}' \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/Feature%20Proposal"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}
Note

파라미터에 name을 사용하는 이전 엔드포인트 PUT /groups/:id/labels도 계속 제공되지만 사용 중단되었습니다.

그룹 레이블 삭제#

지정한 이름의 그룹 레이블을 삭제합니다.

DELETE /groups/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request DELETE \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/bug"
Note

파라미터에 name을 사용하는 이전 엔드포인트 DELETE /groups/:id/labels도 계속 제공되지만 사용 중단되었습니다.

그룹 레이블 구독#

인증된 사용자가 알림을 받도록 그룹 레이블을 구독합니다. 사용자가 이미 해당 레이블을 구독하고 있으면 상태 코드 304를 반환합니다.

POST /groups/:id/labels/:label_id/subscribe
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/9/subscribe"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": true,
  "archived": false
}

그룹 레이블 구독 해제#

인증된 사용자가 그룹 레이블의 알림을 받지 않도록 구독을 해제합니다. 사용자가 해당 레이블을 구독하고 있지 않으면 상태 코드 304를 반환합니다.

POST /groups/:id/labels/:label_id/unsubscribe
속성 유형 필수 설명
id integer or string 예 그룹의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 그룹 레이블의 ID 또는 제목입니다.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/5/labels/9/unsubscribe"

응답 예시:

{
  "id": 9,
  "name": "Feature Idea",
  "color": "#FFA500",
  "text_color" : "#FFFFFF",
  "description": "Describes new ideas",
  "description_html": "Describes new ideas",
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "archived": false
}