GetCommentReactions - Amazon CodeCommit
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.

Request Syntax

{ "commentId": "string", "maxResults": number, "nextToken": "string", "reactionUserArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The ID of the comment for which you want to get reactions information.

Type: String

Required: Yes


A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.

Type: Integer

Required: No


An enumeration token that, when provided in a request, returns the next batch of the results.

Type: String

Required: No


Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.

Type: String

Required: No

Response Syntax

{ "nextToken": "string", "reactionsForComment": [ { "reaction": { "emoji": "string", "shortCode": "string", "unicode": "string" }, "reactionsFromDeletedUsersCount": number, "reactionUsers": [ "string" ] } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


An enumeration token that can be used in a request to return the next batch of the results.

Type: String


An array of reactions to the specified comment.

Type: Array of ReactionForComment objects


For information about the errors that are common to all actions, see Common Errors.


This comment has already been deleted. You cannot edit or delete a deleted comment.

HTTP Status Code: 400


No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.

HTTP Status Code: 400


The comment ID is missing or null. A comment ID is required.

HTTP Status Code: 400


The comment ID is not in a valid format. Make sure that you have provided the full comment ID.

HTTP Status Code: 400


The specified continuation token is not valid.

HTTP Status Code: 400


The specified number of maximum results is not valid.

HTTP Status Code: 400


The Amazon Resource Name (ARN) of the user or identity is not valid.

HTTP Status Code: 400



This example illustrates one usage of GetCommentReactions.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 124 X-Amz-Target: CodeCommit_20150413.GetCommentReactions X-Amz-Date: 20200406T223055Z User-Agent: aws-cli/1.18.36 Python/3.6.10 Linux/ botocore/1.15.36 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAEXAMPLE/20180914/us-east-1/codecommit/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature==8d9b5998EXAMPLE { "commentId": "ff30b348EXAMPLE1EXAMPLE" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: d8ad1d21-EXAMPLE Content-Type: application/x-amz-json-1.1 Content-Length: 2267 Date: Mon, 6 Apr 2020 22:30:56 GMT Connection: keep-alive { "reactionsForComment": { [ { "reaction": { "emoji:"👍", "shortCode": "thumbsup", "unicode": "U+1F44D" }, "users": [ "arn:aws:iam::123456789012:user/Li_Juan", "arn:aws:iam::123456789012:user/Mary_Major", "arn:aws:iam::123456789012:user/Jorge_Souza" ] }, { "reaction": { "emoji": "👎", "shortCode": "thumbsdown", "unicode": "U+1F44E" }, "users": [ "arn:aws:iam::123456789012:user/Nikhil_Jayashankar" ] }, { "reaction": { "emoji": "😕", "shortCode": "confused", "unicode": "U+1F615" }, "users": [ "arn:aws:iam::123456789012:user/Saanvi_Sarkar" ] } ] } }

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: