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

Obtaining Default Review Comment Types

Function

This API is used to obtain the default review comment types.

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/default-review-categories

Request Parameters

Table 1 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 2 Response body parameters

Parameter

Type

Description

codehub_default_categories

Array of categoryDto objects

Definition

Review comment types (all available options, which are returned only when with_default_review_categories: true is transferred).

hicode_default_categories

Array of categoryDto objects

Definition

Preset review comment types (returned only when with_default_review_categories: true is transferred).

Table 3 categoryDto

Parameter

Type

Description

key

String

Definition

Review comment type key.

name_zh

String

Definition

Review comment type (CN).

name_en

String

Definition

Review comment type.

sub_categories

Array of categoryDto objects

Definition

Sub-review comment type.

Status code: 401

Table 4 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

{
  "codehub_default_categories" : [ {
    "key" : "realize",
    "name_zh" : "Algorithm implementation",
    "name_en" : "Realize",
    "sub_categories" : null
  } ],
  "hicode_default_categories" : [ {
    "key" : "code_style",
    "name_zh" : "Programming guideline (code level)",
    "name_en" : "Code Style",
    "sub_categories" : [ {
      "key" : "code_format_or_name",
      "name_zh" : "Typesetting and naming",
      "name_en" : "Code format/Name",
      "sub_categories" : null
    } ]
  } ]
}

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.