Skip to content
Snippets Groups Projects
Commit c7c3b771 authored by Robert Schilling's avatar Robert Schilling
Browse files

Update label's API documentation

parent 76c23746
No related branches found
No related tags found
No related merge requests found
Loading
@@ -26,7 +26,9 @@ Example response:
Loading
@@ -26,7 +26,9 @@ Example response:
"description": "Bug reported by user", "description": "Bug reported by user",
"open_issues_count": 1, "open_issues_count": 1,
"closed_issues_count": 0, "closed_issues_count": 0,
"open_merge_requests_count": 1 "open_merge_requests_count": 1,
"subscribed": false,
"priority": 10
}, },
{ {
"color" : "#d9534f", "color" : "#d9534f",
Loading
@@ -34,7 +36,9 @@ Example response:
Loading
@@ -34,7 +36,9 @@ Example response:
"description": "Confirmed issue", "description": "Confirmed issue",
"open_issues_count": 2, "open_issues_count": 2,
"closed_issues_count": 5, "closed_issues_count": 5,
"open_merge_requests_count": 0 "open_merge_requests_count": 0,
"subscribed": false,
"priority": null
}, },
{ {
"name" : "critical", "name" : "critical",
Loading
@@ -42,7 +46,9 @@ Example response:
Loading
@@ -42,7 +46,9 @@ Example response:
"description": "Critical issue. Need fix ASAP", "description": "Critical issue. Need fix ASAP",
"open_issues_count": 1, "open_issues_count": 1,
"closed_issues_count": 3, "closed_issues_count": 3,
"open_merge_requests_count": 1 "open_merge_requests_count": 1,
"subscribed": false,
"priority": null
}, },
{ {
"name" : "documentation", "name" : "documentation",
Loading
@@ -50,7 +56,9 @@ Example response:
Loading
@@ -50,7 +56,9 @@ Example response:
"description": "Issue about documentation", "description": "Issue about documentation",
"open_issues_count": 1, "open_issues_count": 1,
"closed_issues_count": 0, "closed_issues_count": 0,
"open_merge_requests_count": 2 "open_merge_requests_count": 2,
"subscribed": false,
"priority": null
}, },
{ {
"color" : "#5cb85c", "color" : "#5cb85c",
Loading
@@ -58,7 +66,9 @@ Example response:
Loading
@@ -58,7 +66,9 @@ Example response:
"description": "Enhancement proposal", "description": "Enhancement proposal",
"open_issues_count": 1, "open_issues_count": 1,
"closed_issues_count": 0, "closed_issues_count": 0,
"open_merge_requests_count": 1 "open_merge_requests_count": 1,
"subscribed": false,
"priority": null
} }
] ]
``` ```
Loading
@@ -80,6 +90,7 @@ POST /projects/:id/labels
Loading
@@ -80,6 +90,7 @@ POST /projects/:id/labels
| `name` | string | yes | The name of the label | | `name` | string | yes | The name of the label |
| `color` | string | yes | The color of the label in 6-digit hex notation with leading `#` sign | | `color` | string | yes | The color of the label in 6-digit hex notation with leading `#` sign |
| `description` | string | no | The description of the label | | `description` | string | no | The description of the label |
| `priority` | integer | no | The priority of the label. Must be greater or equal than zero or `null` to remove the priority. |
   
```bash ```bash
curl --data "name=feature&color=#5843AD" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels" curl --data "name=feature&color=#5843AD" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels"
Loading
@@ -91,7 +102,11 @@ Example response:
Loading
@@ -91,7 +102,11 @@ Example response:
{ {
"name" : "feature", "name" : "feature",
"color" : "#5843AD", "color" : "#5843AD",
"description":null "open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"description": null,
"priority": null
} }
``` ```
   
Loading
@@ -127,7 +142,8 @@ Example response:
Loading
@@ -127,7 +142,8 @@ Example response:
"template" : false, "template" : false,
"project_id" : 1, "project_id" : 1,
"created_at" : "2015-11-03T21:22:30.737Z", "created_at" : "2015-11-03T21:22:30.737Z",
"id" : 9 "id" : 9,
"priority": null
} }
``` ```
   
Loading
@@ -151,6 +167,8 @@ PUT /projects/:id/labels
Loading
@@ -151,6 +167,8 @@ PUT /projects/:id/labels
| `new_name` | string | yes if `color` is not provided | The new name of the 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 new color of the label in 6-digit hex notation with leading `#` sign | | `color` | string | yes if `new_name` is not provided | The new color of the label in 6-digit hex notation with leading `#` sign |
| `description` | string | no | The new description of the label | | `description` | string | no | The new description of the label |
| `priority` | integer | no | The new priority of the label. Must be greater or equal than zero or `null` to remove the priority. |
   
```bash ```bash
curl --request PUT --data "name=documentation&new_name=docs&color=#8E44AD&description=Documentation" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels" curl --request PUT --data "name=documentation&new_name=docs&color=#8E44AD&description=Documentation" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels"
Loading
@@ -162,7 +180,11 @@ Example response:
Loading
@@ -162,7 +180,11 @@ Example response:
{ {
"color" : "#8E44AD", "color" : "#8E44AD",
"name" : "docs", "name" : "docs",
"description": "Documentation" "description": "Documentation",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"priority": null
} }
``` ```
   
Loading
@@ -197,7 +219,8 @@ Example response:
Loading
@@ -197,7 +219,8 @@ Example response:
"open_issues_count": 0, "open_issues_count": 0,
"closed_issues_count": 0, "closed_issues_count": 0,
"open_merge_requests_count": 0, "open_merge_requests_count": 0,
"subscribed": true "subscribed": true,
"priority": null
} }
``` ```
   
Loading
@@ -232,6 +255,7 @@ Example response:
Loading
@@ -232,6 +255,7 @@ Example response:
"open_issues_count": 0, "open_issues_count": 0,
"closed_issues_count": 0, "closed_issues_count": 0,
"open_merge_requests_count": 0, "open_merge_requests_count": 0,
"subscribed": false "subscribed": false,
"priority": null
} }
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment