diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-13 14:23:51 +0400 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-13 14:29:03 +0400 |
commit | cf3ba0209dc7dc8b9ac93d574a8f6296b858be40 (patch) | |
tree | 07fa92aa498deb4866ba6f75ed2e9cf03e1a2df6 /doc/api/labels.md | |
parent | 9284038dbef5153dac40eda14f1685a72efe1d1a (diff) |
Update labels via API
Diffstat (limited to 'doc/api/labels.md')
-rw-r--r-- | doc/api/labels.md | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/api/labels.md b/doc/api/labels.md index a83d28107cc..95fd4e84119 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -60,4 +60,26 @@ DELETE /projects/:id/labels It returns 200 if the label successfully was deleted, 404 for wrong parameters and 400 if the label does not exist. -In case of an error, additionally an error is returned. +In case of an error, additionally an error message is returned. + +## Edit an existing label + +Updates an existing label with new name or now color. At least one parameter +is required, to update the label. + +``` +PUT /projects/:id/labels +``` + +Parameters: + +- `id` (required) - The ID of a project +- `name` (required) - The name of the existing label +- `new_name` (optional) - The new name of the label +- `color` (optional) - New color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) + +On success, this method returns 200 with the updated label. +If required parameters are missing, 400 is returned. +If the label to be updated is missing, 404 is returned. +If parameters are invalid, 405 is returned. In case of an error, +additionally an error message is returned. |