<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Group Labels API > 原文:[https://docs.gitlab.com/ee/api/group_labels.html](https://docs.gitlab.com/ee/api/group_labels.html) * [List group labels](#list-group-labels) * [Get a single group label](#get-a-single-group-label) * [Create a new group label](#create-a-new-group-label) * [Update a group label](#update-a-group-label) * [Delete a group label](#delete-a-group-label) * [Subscribe to a group label](#subscribe-to-a-group-label) * [Unsubscribe from a group label](#unsubscribe-from-a-group-label) # Group Labels API[](#group-labels-api "Permalink") 在 GitLab 11.8 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/21368) . 該 API 支持[組標簽的](../user/project/labels.html#project-labels-and-group-labels)管理. 它允許列出,創建,更新和刪除組標簽. 此外,用戶可以訂閱和取消訂閱組標簽. **注意:** `description_html`已添加到[GitLab 12.7 中的](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21413)響應 JSON. ## List group labels[](#list-group-labels "Permalink") 獲取給定組的所有標簽. ``` GET /groups/:id/labels ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) . | | `with_counts` | boolean | no | 是否包括發布和合并請求計數. 默認為`false` . *( [在 GitLab 12.2 中引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/31543) )* | | `include_ancestor_groups` | boolean | no | 包括祖先組. 默認為`true` . | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "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 }, { "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 } ] ``` ## Get a single group label[](#get-a-single-group-label "Permalink") 獲取給定組的單個標簽. ``` GET /groups/:id/labels/:label_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) . | | `label_id` | 整數或字符串 | yes | 群組標簽的 ID 或標題. | | `include_ancestor_groups` | boolean | no | 包括祖先組. 默認為`true` . | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/labels/bug" ``` Example response: ``` { "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 } ``` ## Create a new group label[](#create-a-new-group-label "Permalink") 為給定的組創建一個新的組標簽. ``` POST /groups/:id/labels ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `name` | string | yes | 標簽名稱 | | `color` | string | yes | 標簽的顏色以 6 位十六進制表示法加上前導"#"符號(例如#FFAABB)或[CSS 顏色名稱之一給出](https://s0developer0mozilla0org.icopy.site/en-US/docs/Web/CSS/color_value) | | `description` | string | no | 標簽的說明, | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"name": "Feature Proposal", "color": "#FFA500", "description": "Describes new ideas" }' "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 } ``` ## Update a group label[](#update-a-group-label "Permalink") 更新現有的組標簽. 至少需要一個參數來更新組標簽. ``` PUT /groups/:id/labels/:label_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `label_id` | 整數或字符串 | yes | 群組標簽的 ID 或標題. | | `new_name` | string | no | 標簽的新名稱 | | `color` | string | no | 標簽的顏色以 6 位十六進制表示法加上前導"#"符號(例如#FFAABB)或[CSS 顏色名稱之一給出](https://s0developer0mozilla0org.icopy.site/en-US/docs/Web/CSS/color_value) | | `description` | string | no | 標簽的描述. | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"new_name": "Feature Idea" }' "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 } ``` **注意:**參數中帶有`name`的較早的端點`PUT /groups/:id/labels`仍然可用,但已棄用. ## Delete a group label[](#delete-a-group-label "Permalink") 刪除具有給定名稱的組標簽. ``` DELETE /groups/:id/labels/:label_id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `label_id` | 整數或字符串 | yes | 群組標簽的 ID 或標題. | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/labels/bug" ``` **注意:**參數中帶有`name`的較舊的端點`DELETE /groups/:id/labels`仍然可用,但已棄用. ## Subscribe to a group label[](#subscribe-to-a-group-label "Permalink") 將經過身份驗證的用戶訂閱到組標簽以接收通知. 如果用戶已經訂閱了標簽,則返回狀態碼`304` . ``` POST /groups/:id/labels/:label_id/subscribe ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `label_id` | 整數或字符串 | yes | 群組標簽的 ID 或標題. | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "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 } ``` ## Unsubscribe from a group label[](#unsubscribe-from-a-group-label "Permalink") 從組標簽退訂已認證的用戶以不接收來自該組標簽的通知. 如果用戶未訂閱標簽,則返回狀態碼`304` . ``` POST /groups/:id/labels/:label_id/unsubscribe ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `label_id` | 整數或字符串 | yes | 群組標簽的 ID 或標題. | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "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 } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看