UpdateLabel - Update label

Updated at:

Applicable editions

Central edition, Region edition

Service endpoints and authorization

Product

Resource

Required permissions

Project Collaboration

label

Read/write

Request syntax

Central edition

PUT https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{projectId}/labels/{id}

Region edition

PUT https://{domain}/oapi/v1/projex/projects/{projectId}/labels/{id}

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

The personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: for Central edition

  • No: for Region edition

The ID of the organization.

projectId

string

path

Yes

The project ID.

id

string

path

Yes

The label ID.

-

object

body

No

color

string

body

No

The label color, such as #A773E0.

name

string

body

No

The label name.

operatorId

string

body

No

The operator's user ID. Ignored when a personal access token is used.

199xxxxxxxxx

Request example

Central edition

curl -X 'PUT' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{projectId}/labels/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "color": "",
        "name": "",
        "operatorId": "199xxxxxxxxx"
    }'

Region edition

curl -X 'PUT' \
  'https://{domain}/oapi/v1/projex/projects/{projectId}/labels/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "color": "",
        "name": "",
        "operatorId": "199xxxxxxxxx"
    }'

Response parameters

None.

Error codes

For error codes, see the Error Code Center.