Creating a Tag
Function
This API is used to create a tag.
Calling Method
For details, see Calling APIs.
URI
POST /v1/ipdprojectservice/projects/{project_id}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: 32-character UUID of a project, which uniquely identifies a project. Obtain the value of this parameter from the project_id field in the response body of the Querying the Project List API. Constraints: Regular expression: ^[A-Za-z0-9]{32}$ Options: N/A Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
label_type |
Yes |
String |
Work item type to which a tag belongs. If this parameter is not transferred, tags of all types are queried by default. This parameter is invalid when it is used as an update parameter. The options are: feature, raw requirement, requirement (R&D requirement), task, and bug. |
color |
Yes |
String |
Tag color, which is optional when used as an update parameter. Available color codes: #86CAFF, #6DDEBB, #A6DD82, #FAC20A, #FA9841, #F66F6A, #F3689A, #A97AF8, #71757F, #5E7CE0, #207AB3, #169E6C, #6CA83B, #B58200, #B54E04, #B02121, #AD215B, #572DB3, #4F4F4F, and "#3C51A6". |
title |
Yes |
String |
Tag title. The value can contain a maximum of 15 characters. It is optional when used as an update parameter. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Request status. |
message |
String |
Cause of a failed request. |
result |
LabelEntity object |
Tag details. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition: Tag ID, which is the value of id in the response body returned by calling the Querying the Tag List API. Constraints: Regular expression: ^([0-9]{18,19})$ Options: N/A Default value: N/A |
label_type |
String |
Definition: Type of the work item to which the label belongs, corresponding to the type field of the work item. Constraints: Minimum length: 0 characters. Maximum length: 32 characters. Options: N/A Default value: N/A |
color |
String |
Definition: Tag RGB color. Constraints: Minimum length: 0 characters. Maximum length: 16 characters. Options: N/A Default value: N/A |
title |
String |
Definition: Tag title. Constraints: Minimum length: 2 characters. Maximum length: 256 characters. Options: N/A Default value: N/A |
Example Requests
Creating R&D requirement tags
POST https://{endpoint}/v3/projects/b54914d464d1498a97d683ef198ec448/tags { "title" : "Tag-IR-05", "color" : "#A6DD82", "label_type" : "requirement" }
Example Responses
Status code: 200
OK
{ "status" : "success", "message" : "ok", "result" : { "id" : "1030868827803529217", "label_type" : "requirement", "color" : "#A6DD82", "title" : "Tag-IR-05" } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot