CreateProjectLabel
Creates a label for a repository.
Try it now
Test
RAM authorization
Request syntax
POST /api/v4/projects/labels HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The organization ID. You can find this ID in the URL of your Alibaba Cloud DevOps page, for example: https://devops.aliyun.com/organization/{organizationId}. |
5ebbc0228123212b59xxxxx |
| accessToken |
string |
No |
The personal access token. This parameter is not required if you use an Alibaba Cloud AK/SK or STS temporary authorization for authentication. |
f0b1e61db5961df5975a93f9129d2513 |
| repositoryIdentity |
string |
Yes |
The repository ID or full path. |
2835387 或 codeup/codeup-demo |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The name of the label. |
新特性 |
| color |
string |
Yes |
The color of the label in hexadecimal format. |
#006AD4 |
| description |
string |
No |
The description of the label. |
新的特性或需求 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| requestId |
string |
The unique request ID. Use this ID to troubleshoot issues. |
A7586FEB-E48D-5579-983F-74981FBFF627 |
| success |
boolean |
Indicates whether the request was successful. |
true |
| errorCode |
string |
The error code for a failed request. |
SYSTEM_UNKNOWN_ERROR |
| errorMessage |
string |
The error message for a failed request. |
"" |
| result |
object |
Details of the created label. |
|
| id |
string |
The unique ID of the label. |
b5b5738b94954bc6aa5a293316ed1d24 |
| name |
string |
The name of the label. |
新特性 |
| color |
string |
The color of the label in hexadecimal format. |
#006AD4 |
| description |
string |
The description of the label. |
新的特性或需求 |
Examples
Success response
JSON format
{
"requestId": "A7586FEB-E48D-5579-983F-74981FBFF627",
"success": true,
"errorCode": "SYSTEM_UNKNOWN_ERROR",
"errorMessage": "\"\"",
"result": {
"id": "b5b5738b94954bc6aa5a293316ed1d24",
"name": "新特性",
"color": "#006AD4",
"description": "新的特性或需求\n"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.