Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-27 11:53:09 +0300
committerSean McGivern <sean@gitlab.com>2019-08-27 11:53:09 +0300
commita390f5ff052cfb9d214acbf1f4e78a830ba0e67b (patch)
treeca4dae64930e94f0b799700f3d98afa3303265c3 /doc/api
parent1c983571894355e6087b4c95b445e25d30e4ad3a (diff)
parent1819dbd4d1c06489325f4223222b499a59b78e37 (diff)
Merge branch '57657-promote-label-to-group-label-via-api-endpoint' into 'master'
Promote Label to Group Label via API endpoint Closes #57657 See merge request gitlab-org/gitlab-ce!25218
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/labels.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/api/labels.md b/doc/api/labels.md
index fde1d861cf6..9692cc8b710 100644
--- a/doc/api/labels.md
+++ b/doc/api/labels.md
@@ -186,6 +186,40 @@ Example response:
}
```
+## Promote a project label to a group label
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25218) in GitLab 12.3.
+
+Promotes a project label to a group label.
+
+```
+PUT /projects/:id/labels/promote
+```
+
+| Attribute | Type | Required | Description |
+| --------------- | ------- | --------------------------------- | ------------------------------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `name` | string | yes | The name of the existing label |
+
+```bash
+curl --request PUT --data "name=documentation" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels/promote"
+```
+
+Example response:
+
+```json
+{
+ "id" : 8,
+ "name" : "documentation",
+ "color" : "#8E44AD",
+ "description": "Documentation",
+ "open_issues_count": 1,
+ "closed_issues_count": 0,
+ "open_merge_requests_count": 2,
+ "subscribed": false
+}
+```
+
## Subscribe to a label
Subscribes the authenticated user to a label to receive notifications.