UpdateLabel - Update label
|
Applicable editions |
Central edition, Region edition |
Service endpoints and authorization
- Obtain the service endpoint: Replace
{domain}in the request syntax. - Get a personal access token.
- Get the organization ID: Required only for the Central edition. Go to the basic information page in the Organization Management console to find it.
|
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 |
|
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 |
|
| 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.