Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Discussion/ Obtaining the Repository Review Comment List
Updated on 2026-01-27 GMT+08:00

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.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:repository:getRepository

Read

-

-

-

-

URI

GET https://{hostURL}/v4/repositories/{repository_id}/reviews

Table 1 Path Parameters

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

Default Value

N/A

Value range:

1~2147483647

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

noteable_type

Yes

String

Definition

Comment type.

Range

  • Commit: indicates commit.

  • MergeRequest: indicates MR.

Enumeration values:

  • Commit

  • MergeRequest

search

No

String

Definition

Query comment content.

start_date

No

String

Definition

Start date.

end_date

No

String

Definition

End date.

only_count

No

Boolean

Definition:

Whether to return only results containing the commit count and difference count.

Value range:

  • true: return only results containing the commit count and difference count.

  • false: return result information according to the compare_view parameter.

Default value:

false

review_categories

No

String

Definition

Types of searched review comments.

Range

1–200 characters.

review_modules

No

String

Definition

Modules of searched review comments.

Range

1–200 characters.

severity

No

String

Definition

Review comment severity.

Enumeration values:

  • suggestion

  • minor

  • major

  • fatal

assignee_id

No

Integer

Definition

Review comment assignee ID.

Value range:

1~2147483647

proposer_id

No

Integer

Definition

ID of a reviewer who gives review comments.

Value range:

1~2147483647

target_branch

No

String

Definition

Target branch name.

Range

1–2,000 characters.

Value range:

1~2000

include_reply

No

Boolean

Definition

Whether to include replies.

Range

  • true: yes.

  • false: no.

Default value:

false

order_by

No

String

Definition

Sorting method.

Range

  • created: creation time.

  • updated: update time.

Default value:

created_at

Enumeration values:

  • created_at

  • updated_at

sort

No

String

Definition

Sort review comments.

  • asc: results are returned in the order they were created, from oldest to newest

  • desc: results are returned in the order they were created, from newest to oldest

offset

No

Integer

Definition

Offset, which starts from 0.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Definition

Number of returned records.

Value range:

1~100

Default value:

20

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of ReviewDto objects

Review comment details

Table 5 ReviewDto

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:

  • suggestion

  • minor

  • major

  • fatal

severity_cn

String

Definition

Severity (CN).

Constraints

  • Suggestion

  • Minor

  • Major

  • Critical

severity_en

String

Definition

Severity.

Enumeration values:

  • Suggestion

  • Minor

  • Major

  • Fatal

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=MergeRequest.)

merge_request_iid

Integer

Definition

MR IID. (Returned when noteable_type=MergeRequest.)

merge_request_title

String

Definition

MR title. (Returned when noteable_type=MergeRequest.)

merge_request_state

String

Definition

MR status. (Returned when noteable_type=MergeRequest.)

commit_id

String

Definition

Commit ID (returned when noteable_type=Commit).

Table 6 UserBasicDto

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:

  • active: available account

  • blocked: locked user

  • error: The user is not found

Enumeration values:

  • active

  • blocked

  • error

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

email

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

Table 7 Response body parameters

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.