Obtaining Associated Work Item Information
Function
Obtain information about associated work items in a repository.
URI
GET /v2/repositories/{repository_uuid}/related-commits
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repository_uuid |
Yes |
String |
Explanation: Repository UUID. For details, see the UUID returned by obtaining repository details. Constraints None. Range: 32 digits and letters. Default value None. |
|
type |
No |
Integer |
Explanation: Associated work item type. Constraints None. Range:
Default value 0 |
|
search |
No |
String |
Explanation: Keyword used for the query. Constraints None. Range: None. Default value None. |
|
page |
No |
Integer |
Explanation: Page number. Constraints None. Range: None. Default value 1 |
|
per_page |
No |
Integer |
Explanation: Number of records on each page. Constraints None. Range: 1–100 Default value 20 |
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. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Object Error |
Explanation: Response error code. Range: None. |
|
result |
Object RelatedCommitListVo |
Explanation: Associated work item list. Range: None. |
|
status |
String |
Explanation: Response status of the API. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Explanation: Error code. Range: Max. 100 characters in the error code format. |
|
message |
String |
Explanation: Error message. Range: None. |
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Explanation: Number of returned results. Range: None. |
|
list |
Array RelatedCommitVo |
Explanation: Array of the returned results. Range: None. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Explanation: Primary key ID of the associated work item. Range: None. |
|
iamId |
String |
Explanation: IAM user ID. Range: None. |
|
userName |
String |
Explanation: Username. Range: None. |
|
repoId |
String |
Explanation: Repository ID. Range: None. |
|
tenantName |
String |
Explanation: Tenant name. Range: None. |
|
nickName |
String |
Explanation: User alias. Range: None. |
|
branchName |
String |
Explanation: Branch name. Range: None. |
|
commitId |
String |
Explanation: Commit ID Range: None. |
|
commitShortId |
String |
Explanation: Commit short ID. Range: None. |
|
commitMsg |
String |
Explanation: Commit message. Range: None. |
|
commitUrl |
String |
Explanation: Commit URL. Range: None. |
|
relatedId |
String |
Explanation: Work item ID. Range: None. |
|
createAt |
String |
Explanation: Creation time. Range: None. |
|
updateAt |
String |
Explanation: Update time. Range: None. |
|
relatedUrl |
String |
Explanation: Work item URL. Range: None. |
|
result |
String |
Explanation: Association result. Range:
|
Example Requests
GET https://{endpoint}/v2/repositories/{repository_uuid}/related-commits
Example Responses
Status code: 200
{
"result":{ "total": 1
list: [{
"id": "1",
"iamId": "eab0854acdda4b3d90f51de6f9d6349e",
"userName": "test",
"tenantName": "tenant_name",
"nickName": "nick_name",
"repoId": "8",
"userId": "6776",
"branchName": "master",
"commitId": "30baec6147897d404f1ed1f44a7dec0e300a2d271",
"commitShortId": "30baec61",
"commitMsg": "1",
"commitUrl": "https://example.com/codehub/2111986349/30baec6147897d404f1ed1f44a7dec0e300a2d27/commitdetail",
"relatedId": "9152325",
"relatedUrl": "https://example.com/projectman/scrum/c1f7364751e0406b8d9a46f492cba662/task/detail/9152325",
"result": 1,
"createdAt": "",
"updatedAt": ""
}],
"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