summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-08-23 17:45:42 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-08-23 17:45:42 +0000
commitf1e24d4d31776f675cd4a7cdc21ddc9d496400cf (patch)
treef756ce1ffa010d289165e1b6bbed4cd41c3da59c /doc
parente84922906e51b22f2f335ebaa4390ccac2e4caf8 (diff)
downloadgitlab-ce-f1e24d4d31776f675cd4a7cdc21ddc9d496400cf.tar.gz
Add label_id parameter to label API for PUT and DELETE
Add specs for new parameter and updated documentation as well.
Diffstat (limited to 'doc')
-rw-r--r--doc/api/labels.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/api/labels.md b/doc/api/labels.md
index 5db0edcf14d..fde1d861cf6 100644
--- a/doc/api/labels.md
+++ b/doc/api/labels.md
@@ -137,8 +137,9 @@ DELETE /projects/:id/labels
| 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 label |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `label_id` | integer | yes (or `name`) | The id of the existing label |
+| `name` | string | yes (or `label_id`) | The name of the existing label |
```bash
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels?name=bug"
@@ -156,7 +157,8 @@ PUT /projects/:id/labels
| 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 |
+| `label_id` | integer | yes (or `name`) | The id of the existing label |
+| `name` | string | yes (or `label_id`) | The name of the existing label |
| `new_name` | string | yes if `color` is not provided | The new name of the label |
| `color` | string | yes if `new_name` is not provided | The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords) |
| `description` | string | no | The new description of the label |