Obtaining the Repository Review Comment List
Function
This API is used to obtain a repository review list.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET https://{hostURL}/v4/repositories/{repository_id}/reviews
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| repository_id | Yes | Integer | Definition You can query the project list to obtain the repository ID by calling the API used to query user's all repositories. Constraints N/A. Value range: 1~2147483647 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. Range 1–100,000 characters. Default Value N/A. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of ReviewDto objects | Review comment details |
| Parameter | Type | Description |
|---|---|---|
| assignee | UserBasicDto object | Definition Review comment assignee. |
| author | UserBasicDto object | Definition Author of an MR or commit. |
| note | String | Definition Comment content. |
| created_at | String | Definition Creation time. |
| is_reply | Boolean | Definition Reply or not. |
| resolved_by | UserBasicDto object | Definition Review comment solver. |
| discussion_id | String | Definition Review comment ID, which is shared by the main comment and replies. |
| repository_path | String | Definition Repository path. |
| repository_id | Integer | Definition Repository ID. Value range: 1~2147483647 |
| review_categories | String | Definition Comment type key. |
| review_categories_cn | String | Definition Comment type (CN). |
| review_categories_en | String | Definition Comment type. |
| review_modules | String | Definition Review comment module. |
| severity | String | Definition Severity key. Enumeration values: |
| severity_cn | String | Definition Severity (CN). Constraints |
| severity_en | String | Definition Severity. Enumeration values: |
| proposer | UserBasicDto object | Definition Reviewer who gives review comments. |
| reviewer | UserBasicDto object | Definition Review comment author. |
| resolved | Boolean | Definition Resolved or not. |
| resolved_at | String | Definition Resolution time. |
| link | String | Definition MR or commit link. |
| moderation_result | Boolean | Definition Content approving result. |
| moderation_time | Long | Definition Content approving time. |
| moderation_status | Integer | Definition Content approving status. |
| merge_request_id | Integer | Definition MR ID (returned when noteable_type=MergRequest). |
| merge_request_iid | Integer | Definition MR IID (returned when noteable_type=MergRequest). |
| merge_request_title | String | Definition MR title (returned when noteable_type=MergRequest). |
| merge_request_state | String | Definition MR status (returned when noteable_type=MergRequest). |
| commit_id | String | Definition Commit ID (returned when noteable_type=Commit). |
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Definition User ID. Value range: 1~2147483647 |
| name | String | Definition Username. |
| username | String | Definition Username. |
| state | String | Definition: User status Value range: Enumeration values: |
| service_license_status | Integer | Service-level permission status. 0: disabled; 1: enabled |
| avatar_url | String | User profile picture URL |
| avatar_path | String | User profile picture path |
| | String | User email |
| name_cn | String | Username (CN) |
| web_url | String | User homepage |
| nick_name | String | User alias |
| tenant_name | String | Tenant name |
| error_message | String | Definition When some query APIs detect that the user permission in the transfer parameter is insufficient or the user does not exist, the user is returned but the field is not empty for information. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Example Requests
None
Example Responses
Status code: 200
OK
[ {
"assignee" : {
"id" : 9124,
"name" : "example_name",
"username" : "c369c68f1ff84679b5a8ed904d8bff1c",
"state" : "active",
"service_license_status" : null,
"avatar_url" : null,
"avatar_path" : null,
"email" : "liujian@example.com",
"name_cn" : "example_name",
"web_url" : "https://example.com/c369c68f1ff84679b5a8ed904d8bff1c",
"nick_name" : "beta_dv",
"tenant_name" : "example_name",
"error_message" : null
},
"author" : {
"id" : 9124,
"name" : "example_name",
"username" : "c369c68f1ff84679b5a8ed904d8bff1c",
"state" : "active",
"service_license_status" : null,
"avatar_url" : null,
"avatar_path" : null,
"email" : "liujian@example.com",
"name_cn" : "example_name",
"web_url" : "https://example.com/c369c68f1ff84679b5a8ed904d8bff1c",
"nick_name" : "beta_dv",
"tenant_name" : "example_name",
"error_message" : null
},
"note" : "test",
"created_at" : "2025-06-19T21:56:37.000+08:00",
"is_reply" : false,
"resolved_by" : null,
"discussion_id" : "ba3daf3922c7fa2f7adebff2457d40aaced95d00",
"repository_path" : "4f96a4f00f17466bab756a2379236c85/mr_test",
"repository_id" : 2111987241,
"review_categories" : "realize",
"review_categories_cn" : "Algorithm implementation",
"review_categories_en" : "Algorithm",
"review_modules" : 789,
"severity" : "suggestion",
"severity_cn" : "Suggestion",
"severity_en" : "Suggestion",
"proposer" : {
"id" : 9124,
"name" : "example_name",
"username" : "c369c68f1ff84679b5a8ed904d8bff1c",
"state" : "active",
"service_license_status" : null,
"avatar_url" : null,
"avatar_path" : null,
"email" : "liujian@example.com",
"name_cn" : "example_name",
"web_url" : "https://example.com/c369c68f1ff84679b5a8ed904d8bff1c",
"nick_name" : "beta_dv",
"tenant_name" : "example_name",
"error_message" : null
},
"reviewer" : {
"id" : 9124,
"name" : "example_name",
"username" : "c369c68f1ff84679b5a8ed904d8bff1c",
"state" : "active",
"service_license_status" : null,
"avatar_url" : null,
"avatar_path" : null,
"email" : "liujian@example.com",
"name_cn" : "example_name",
"web_url" : "https://example.com/c369c68f1ff84679b5a8ed904d8bff1c",
"nick_name" : "beta_dv",
"tenant_name" : "example_name",
"error_message" : null
},
"resolved" : false,
"resolved_at" : null,
"link" : "https://example.com/********/2111987241/37/mergedetail?source=dev&target=0319-test",
"moderation_result" : null,
"moderation_time" : null,
"moderation_status" : null,
"merge_request_id" : 72447,
"merge_request_iid" : 37,
"merge_request_title" : "mr_title",
"merge_request_state" : "opened"
} ] Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 401 | Unauthorized |
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.