InfoGrab DocsInfoGrab Docs

프로젝트 레이블 API

요약

이 API로 프로젝트 레이블을 관리합니다. 그룹 레이블은 그룹 레이블 API를 사용합니다. 지정한 프로젝트의 모든 레이블을 조회합니다. API 결과는 페이지네이션이 적용되므로 이 요청은 기본적으로 한 번에 20건을 반환합니다.

히스토리

이 API로 프로젝트 레이블을 관리합니다.

그룹 레이블은 그룹 레이블 API를 사용합니다.

프로젝트 레이블 전체 조회#

지정한 프로젝트의 모든 레이블을 조회합니다.

API 결과는 페이지네이션이 적용되므로 이 요청은 기본적으로 한 번에 20건을 반환합니다.

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

응답 예시:

[
  {
    "id" : 1,
    "name" : "bug",
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "description": "Bug reported by user",
    "description_html": "Bug reported by user",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 1,
    "subscribed": false,
    "priority": 10,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 4,
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "name" : "confirmed",
    "description": "Confirmed issue",
    "description_html": "Confirmed issue",
    "open_issues_count": 2,
    "closed_issues_count": 5,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "priority": null,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 7,
    "name" : "critical",
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "description": "Critical issue. Need fix ASAP",
    "description_html": "Critical issue. Need fix ASAP",
    "open_issues_count": 1,
    "closed_issues_count": 3,
    "open_merge_requests_count": 1,
    "subscribed": false,
    "priority": null,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 8,
    "name" : "documentation",
    "color" : "#f0ad4e",
    "text_color" : "#FFFFFF",
    "description": "Issue about documentation",
    "description_html": "Issue about documentation",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 2,
    "subscribed": false,
    "priority": null,
    "is_project_label": false,
    "archived": false
  },
  {
    "id" : 9,
    "color" : "#5cb85c",
    "text_color" : "#FFFFFF",
    "name" : "enhancement",
    "description": "Enhancement proposal",
    "description_html": "Enhancement proposal",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 1,
    "subscribed": true,
    "priority": null,
    "is_project_label": true,
    "archived": false
  }
]

프로젝트 레이블 단건 조회#

프로젝트에서 지정한 레이블을 조회합니다.

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

응답 예시:

{
  "id" : 1,
  "name" : "bug",
  "color" : "#d9534f",
  "text_color" : "#FFFFFF",
  "description": "Bug reported by user",
  "description_html": "Bug reported by user",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 1,
  "subscribed": false,
  "priority": 10,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 생성#

지정한 프로젝트에 지정한 이름과 색으로 레이블을 생성합니다.

POST /projects/:id/labels
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
name string 예 레이블의 이름
color string 예 앞에 '#' 이 붙는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블의 색
description string 아니요 레이블의 설명
priority integer 아니요 레이블의 우선순위. 0 이상이어야 하며, 우선순위를 제거하려면 null을 지정합니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels" \
  --data "name=feature&color=#5843AD"

응답 예시:

{
  "id" : 10,
  "name" : "feature",
  "color" : "#5843AD",
  "text_color" : "#FFFFFF",
  "description":null,
  "description_html":null,
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "priority": null,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 삭제#

프로젝트에서 지정한 레이블을 삭제합니다.

DELETE /projects/: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/projects/1/labels/bug"
Note

파라미터에 name을 사용하는 구형 엔드포인트 DELETE /projects/:id/labels도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블 수정#

프로젝트에서 지정한 레이블의 이름이나 색을 수정합니다. 레이블을 수정하려면 파라미터가 하나 이상 필요합니다.

PUT /projects/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 프로젝트 레이블의 ID 또는 제목.
new_name string yes if color is not provided 레이블의 새 이름
color string yes if new_name is not provided 앞에 '#' 이 붙는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블의 색
description string 아니요 레이블의 새 설명
priority integer 아니요 레이블의 새 우선순위. 0 이상이어야 하며, 우선순위를 제거하려면 null을 지정합니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels/documentation" \
  --data "new_name=docs&color=#8E44AD&description=Documentation"

응답 예시:

{
  "id" : 8,
  "name" : "docs",
  "color" : "#8E44AD",
  "text_color" : "#FFFFFF",
  "description": "Documentation",
  "description_html": "Documentation",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 2,
  "subscribed": false,
  "priority": null,
  "is_project_label": true,
  "archived": false
}
Note

파라미터에 name 이나 label_id를 사용하는 구형 엔드포인트 PUT /projects/:id/labels도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블을 그룹 레이블로 승격#

지정한 프로젝트 레이블을 그룹 레이블로 승격합니다. 레이블의 ID는 그대로 유지됩니다.

PUT /projects/:id/labels/:label_id/promote
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 프로젝트 레이블의 ID 또는 제목.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels/documentation/promote"

응답 예시:

{
  "id" : 8,
  "name" : "documentation",
  "color" : "#8E44AD",
  "description": "Documentation",
  "description_html": "Documentation",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 2,
  "subscribed": false,
  "archived": false
}
Note

파라미터에 name을 사용하는 구형 엔드포인트 PUT /projects/:id/labels/promote도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블 구독#

알림을 받도록 인증된 사용자를 지정한 프로젝트 레이블에 구독시킵니다. 사용자가 이미 해당 레이블을 구독 중이면 상태 코드 304를 반환합니다.

POST /projects/: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/projects/5/labels/1/subscribe"

응답 예시:

{
  "id" : 1,
  "name" : "bug",
  "color" : "#d9534f",
  "text_color" : "#FFFFFF",
  "description": "Bug reported by user",
  "description_html": "Bug reported by user",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 1,
  "subscribed": true,
  "priority": null,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 구독 해지#

알림 수신을 중단하도록 인증된 사용자의 지정한 프로젝트 레이블 구독을 해지합니다. 사용자가 해당 레이블을 구독하고 있지 않으면 상태 코드 304를 반환합니다.

POST /projects/: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/projects/5/labels/1/unsubscribe"

프로젝트 레이블 API

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

요약

이 API로 프로젝트 레이블을 관리합니다. 그룹 레이블은 그룹 레이블 API를 사용합니다. 지정한 프로젝트의 모든 레이블을 조회합니다. API 결과는 페이지네이션이 적용되므로 이 요청은 기본적으로 한 번에 20건을 반환합니다.

히스토리

이 API로 프로젝트 레이블을 관리합니다.

그룹 레이블은 그룹 레이블 API를 사용합니다.

프로젝트 레이블 전체 조회#

지정한 프로젝트의 모든 레이블을 조회합니다.

API 결과는 페이지네이션이 적용되므로 이 요청은 기본적으로 한 번에 20건을 반환합니다.

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

응답 예시:

[
  {
    "id" : 1,
    "name" : "bug",
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "description": "Bug reported by user",
    "description_html": "Bug reported by user",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 1,
    "subscribed": false,
    "priority": 10,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 4,
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "name" : "confirmed",
    "description": "Confirmed issue",
    "description_html": "Confirmed issue",
    "open_issues_count": 2,
    "closed_issues_count": 5,
    "open_merge_requests_count": 0,
    "subscribed": false,
    "priority": null,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 7,
    "name" : "critical",
    "color" : "#d9534f",
    "text_color" : "#FFFFFF",
    "description": "Critical issue. Need fix ASAP",
    "description_html": "Critical issue. Need fix ASAP",
    "open_issues_count": 1,
    "closed_issues_count": 3,
    "open_merge_requests_count": 1,
    "subscribed": false,
    "priority": null,
    "is_project_label": true,
    "archived": false
  },
  {
    "id" : 8,
    "name" : "documentation",
    "color" : "#f0ad4e",
    "text_color" : "#FFFFFF",
    "description": "Issue about documentation",
    "description_html": "Issue about documentation",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 2,
    "subscribed": false,
    "priority": null,
    "is_project_label": false,
    "archived": false
  },
  {
    "id" : 9,
    "color" : "#5cb85c",
    "text_color" : "#FFFFFF",
    "name" : "enhancement",
    "description": "Enhancement proposal",
    "description_html": "Enhancement proposal",
    "open_issues_count": 1,
    "closed_issues_count": 0,
    "open_merge_requests_count": 1,
    "subscribed": true,
    "priority": null,
    "is_project_label": true,
    "archived": false
  }
]

프로젝트 레이블 단건 조회#

프로젝트에서 지정한 레이블을 조회합니다.

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

응답 예시:

{
  "id" : 1,
  "name" : "bug",
  "color" : "#d9534f",
  "text_color" : "#FFFFFF",
  "description": "Bug reported by user",
  "description_html": "Bug reported by user",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 1,
  "subscribed": false,
  "priority": 10,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 생성#

지정한 프로젝트에 지정한 이름과 색으로 레이블을 생성합니다.

POST /projects/:id/labels
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
name string 예 레이블의 이름
color string 예 앞에 '#' 이 붙는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블의 색
description string 아니요 레이블의 설명
priority integer 아니요 레이블의 우선순위. 0 이상이어야 하며, 우선순위를 제거하려면 null을 지정합니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request POST \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels" \
  --data "name=feature&color=#5843AD"

응답 예시:

{
  "id" : 10,
  "name" : "feature",
  "color" : "#5843AD",
  "text_color" : "#FFFFFF",
  "description":null,
  "description_html":null,
  "open_issues_count": 0,
  "closed_issues_count": 0,
  "open_merge_requests_count": 0,
  "subscribed": false,
  "priority": null,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 삭제#

프로젝트에서 지정한 레이블을 삭제합니다.

DELETE /projects/: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/projects/1/labels/bug"
Note

파라미터에 name을 사용하는 구형 엔드포인트 DELETE /projects/:id/labels도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블 수정#

프로젝트에서 지정한 레이블의 이름이나 색을 수정합니다. 레이블을 수정하려면 파라미터가 하나 이상 필요합니다.

PUT /projects/:id/labels/:label_id
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 프로젝트 레이블의 ID 또는 제목.
new_name string yes if color is not provided 레이블의 새 이름
color string yes if new_name is not provided 앞에 '#' 이 붙는 6자리 16진수 표기(예: #FFAABB) 또는 CSS 색상 이름 중 하나로 지정하는 레이블의 색
description string 아니요 레이블의 새 설명
priority integer 아니요 레이블의 새 우선순위. 0 이상이어야 하며, 우선순위를 제거하려면 null을 지정합니다.
archived boolean 아니요 true 이면 레이블을 보관 상태로 표시합니다. 기본값: false.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels/documentation" \
  --data "new_name=docs&color=#8E44AD&description=Documentation"

응답 예시:

{
  "id" : 8,
  "name" : "docs",
  "color" : "#8E44AD",
  "text_color" : "#FFFFFF",
  "description": "Documentation",
  "description_html": "Documentation",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 2,
  "subscribed": false,
  "priority": null,
  "is_project_label": true,
  "archived": false
}
Note

파라미터에 name 이나 label_id를 사용하는 구형 엔드포인트 PUT /projects/:id/labels도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블을 그룹 레이블로 승격#

지정한 프로젝트 레이블을 그룹 레이블로 승격합니다. 레이블의 ID는 그대로 유지됩니다.

PUT /projects/:id/labels/:label_id/promote
속성 유형 필수 설명
id integer or string 예 프로젝트의 ID 또는 URL 인코딩된 경로
label_id integer or string 예 프로젝트 레이블의 ID 또는 제목.
curl --request PUT \
  --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/labels/documentation/promote"

응답 예시:

{
  "id" : 8,
  "name" : "documentation",
  "color" : "#8E44AD",
  "description": "Documentation",
  "description_html": "Documentation",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 2,
  "subscribed": false,
  "archived": false
}
Note

파라미터에 name을 사용하는 구형 엔드포인트 PUT /projects/:id/labels/promote도 여전히 사용할 수 있으나 더 이상 사용되지 않습니다.

프로젝트 레이블 구독#

알림을 받도록 인증된 사용자를 지정한 프로젝트 레이블에 구독시킵니다. 사용자가 이미 해당 레이블을 구독 중이면 상태 코드 304를 반환합니다.

POST /projects/: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/projects/5/labels/1/subscribe"

응답 예시:

{
  "id" : 1,
  "name" : "bug",
  "color" : "#d9534f",
  "text_color" : "#FFFFFF",
  "description": "Bug reported by user",
  "description_html": "Bug reported by user",
  "open_issues_count": 1,
  "closed_issues_count": 0,
  "open_merge_requests_count": 1,
  "subscribed": true,
  "priority": null,
  "is_project_label": true,
  "archived": false
}

프로젝트 레이블 구독 해지#

알림 수신을 중단하도록 인증된 사용자의 지정한 프로젝트 레이블 구독을 해지합니다. 사용자가 해당 레이블을 구독하고 있지 않으면 상태 코드 304를 반환합니다.

POST /projects/: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/projects/5/labels/1/unsubscribe"