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.
URI
GET https://{hostURL}/v4/default-review-categories
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 |
|---|---|---|
| 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). |
| 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
| 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.