Associating Work Items with a Branch
Function
This API is used to associate work items with a branch.
URI
POST /v2/projects/issues
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Explanation User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints None. Range 1–100,000 characters. Default value None. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
branch |
Yes |
String |
Explanation Branch name. Constraints None. Range None. Default value None. |
|
project_id |
Yes |
String |
Explanation Project ID. For details, see Obtaining a Project ID. Constraints None. Range None. Default value None. |
|
related_id |
Yes |
Array of strings |
Explanation Work item IDs to be associated Constraints None. Range None. Default value None. |
|
repo_id |
Yes |
String |
Explanation Repository ID, which can be obtained by calling the API for querying all repositories of a user. Constraints None. Range None. Default value None. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Explanation Response error code. Range None. |
|
status |
String |
Explanation Response status. Range
|
Example Requests
POST https://{endpoint}/v2/projects/issues
{
"project_id" : "a6142fa102b740988fe45cc40254d61c",
"branch" : "unionsdk",
"repo_id" : "2111616668",
"related_id" : [ "5561081" ]
}
Example Responses
Status code: 200
OK
{
"status" : "success"
}
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