79146199

Date: 2024-10-31 20:08:37
Score: 2.5
Natty:
Report link

I've been having the same problem using the Python API, and I suspect it doesn't expose this functionality. So here's my plan for testing this via curl or similar:

The GitLab API Docs page on Emoji Reactions has a section §Add reactions to comments that discusses emoji reactions to comments (aka notes). Below is a summary of that §.

It says that the form is supposed to be:

GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji
                  ^^^^^^^^^^^^^^^^^

Substitute merge_requests/merge_request_iid or snippets/:snippet_id as appropriate.

So,

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji"

will return a json list of the emoji, and appending /:award_id would retrieve a single one. For example:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/issues/80/notes/1/award_emoji/2"

would return

{
  "id": 2,
  "name": "mood_bubble_lightning",
  "user": {
    "name": "User 4",
    "username": "user4",
    "id": 26,
    "state": "active",
    "avatar_url": "http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon",
    "web_url": "http://gitlab.example.com/user4"
  },
  "created_at": "2016-06-15T10:09:34.197Z",
  "updated_at": "2016-06-15T10:09:34.197Z",
  "awardable_id": 1,
  "awardable_type": "Note"
}
Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same problem
  • Low reputation (0.5):
Posted by: ctwardy