From cf3ba0209dc7dc8b9ac93d574a8f6296b858be40 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 13 Aug 2014 12:23:51 +0200 Subject: Update labels via API --- doc/api/labels.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'doc/api/labels.md') 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. -- cgit v1.2.3