labels

Source:

Methods

(static) addProjectLabel(id, payload)

Create a new label

Source:
See:

POST /projects/:id/labels

curl --data "name=feature&color=#5843AD" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels"
Parameters:
Name Type Description
id integer

The ID of the project

payload object

-

Properties
Name Type Description
name string

The name of the label

color string

The color of the label in 6-digit hex notation with leading # sign

(static) deleteProjectLabels(id)

Delete a label

Source:
See:

DELETE /projects/:id/labels

curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels?name=bug"
Parameters:
Name Type Description
id integer

The ID of the project

(static) getProjectLabels(id)

List labels

Source:
See:

GET /projects/:id/labels

curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/labels
Parameters:
Name Type Description
id integer

The ID of the project

(static) updateProjectLabels(id, payload)

Edit an existing label

Source:
See:

PUT /projects/:id/labels

curl -X PUT --data "name=documentation&new_name=docs&color=#8E44AD" -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/labels"
Parameters:
Name Type Description
id integer

The ID of the project

payload object

-

Properties
Name Type Description
name string

The name of the existing label

new_name string

The new name of the label

color string

The new color of the label in 6-digit hex notation with leading # sign