Obtaining Comments on a Specified Work Item
Function
Obtains comments on a work item.
URI
GET /v4/projects/{project_id}/issues/{issue_id}/comments
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the 32-bit ID of the devcloud project. Minimum: 32 Maximum: 32 |
issue_id |
Yes |
Integer |
Identifies a work item. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Pagination index, offset Minimum: 0 Default: 0 |
limit |
No |
Integer |
Number of records displayed on each page. A maximum of 100 records can be displayed. Minimum: 1 Maximum: 100 Default: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. Minimum: 10 Maximum: 32768 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of comments |
comments |
Array of IssueCommentV4 objects |
Product Theory List |
Parameter |
Type |
Description |
---|---|---|
comment |
String |
Indicates the comment content. |
id |
Integer |
Identifies a comment. |
created_time |
String |
Indicates the time when the comment is made. |
user |
CommentUserV4 object |
|
Parameter |
Type |
Description |
---|---|---|
user_num_id |
Integer |
Identifies a user who has posted a comment. |
user_name |
String |
Indicates the name of the user who has posted a comment. |
nick_name |
String |
Indicates the nickname of the user who has posted a comment. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Description |
error_code |
String |
Error Codes |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Description |
error_code |
String |
Error Codes |
Example Requests
Get https://{endpoint}/v4/projects/e2da96a5d2c845e284f0ad47f8ca8cb1/issues/1232495/comments Get https://{endpoint}/v4/projects/e2da96a5d2c845e284f0ad47f8ca8cb1/issues/1232495/comments
Example Responses
Status code: 200
OK
{ "total" : 3, "comments" : [ { "comment" : "<p>cost</p>", "id" : 2777430, "created_time" : "2019-10-18", "user" : { "user_num_id" : 4091, "user_name" : "demo_user_name", "nick_name" : "name" } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot