Help Center/ CodeArts Repo/ API Reference/ APIs/ Repository/ Obtaining Associated Work Item Information
Updated on 2025-03-28 GMT+08:00

Obtaining Associated Work Item Information

Function

Obtain information about associated work items.

URI

GET /v2/repositories/{repository_uuid}/related-commits

Table 1 Path parameters

Parameter

Mandatory

Type

Description

repository_uuid

Yes

String

Repository long ID.

type

No

Integer

Associated work item type.

search

No

String

Keyword for search.

page

No

Integer

Page number.

per_page

No

Integer

Number of records on each page.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Object Error

Response error.

result

Object RelatedCommitListVo

Associated work item list.

status

String

Response status.

Table 4 Response error parameters

Parameter

Type

Description

code

String

Error code.

message

String

Error message.

Table 5 RelatedCommitListVo response parameters

Parameter

Type

Description

total

Integer

Number of returned results.

list

Array RelatedCommitVo

Array of the returned results.

Table 6 RelatedCommitVo response parameters

Parameter

Type

Description

id

String

Primary key ID.

iam_id

String

User ID.

user_name

String

Username.

repository_id

String

Repository ID.

type

String

Type.

user_id

String

User ID.

branch_name

String

Branch name.

commit_id

String

Commit ID

commit_shortId

String

Commit short ID

commit_msg

String

Commit message.

commit_url

String

Commit URL.

commit_type

String

Commit type.

related_id

String

Work item ID.

create_at

String

Creation time.

update_at

String

Update time.

related_url

String

Work item URL

message

String

Description

Example Requests

GET https://{endpoint}/v2/repositories/{repository_uuid}/related-commits

Example Responses

Status code: 200

OK
{
    "result": [{
        "id": "1",
        "iamId": "66666",
        "userName": "test",
        "repositoryId": "8",
        "type": "commit",
        "userId": "6776",
        "branchName": "master",
        "commitId": "1",
        "commitShortId": "1",
        "commitMsg": "1",
        "commitUrl": "",
        "commitType": "",
        "relatedId": "",
        "relatedUrl": "",
        "message": "",
        "createdAt": "",
        "updatedAt": ""
    }],
    "status": "success"
}

Status Code

Status Code

Description

200

OK

Error code.

See Error Codes.