You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi @Brent Jenkins ,
I'm sorry I couldn't answer earlier; anyway, try adding the following header to your request:
In the body you have to specify: emojiId, ari and containerAri; for an example, check the network traffic from the console of your browser when you add a reaction manually.
Thanks for your tips and suggesting that header! Unfortunately I still get a 401 unauthorized error. While inspecting the network traffic doing it manually, it appears this api is still using cookie-based authentication. However, that authentication method has been deprecated by Jira for third party clients. So, it doesn't seem like there's a way to access this API any more? Maybe if I use an Admin API token with basic auth instead of a user token it would work?
Hey @Brent Jenkins ,
Why not get a valid cookie from a browser session and use that? I mean since you are already working with undocumented APIs at this point, you might as well start doing the really hackish solution ;-)
Seriously though, the way I would approach this is to look into the browser's web developer tools and then try to mimic what is going on there – including the cookie session. You'd be surprised how often this approach brings stable results.
Hope that helps,
@Oliver Siebenmarck _Polymetis Apps_ thanks for the suggestion! I guess I should have mentioned I am trying to connect to this API using Jira Automation with the Send Web Request action.
I'm trying to make it easy for people to locate issues where they have been @mentioned in the most recent comment, so they can remember to respond. To do this, I have set up an automation rule triggered by every new comment that parses the comment's body for any @mentions. When it finds one, it sets the value of a custom user field as the same user that was mentioned. Now people can use a filter to query for issues on that custom field to find the ones where they were the most recently mentioned user.
The annoying thing about this is a lot of @mentions are simply to notify that specific person about something, and don't require a response. In those cases, it's natural for that mentioned person to simply add a reaction to that comment to acknowledge they have read it. So, I want to be able to detect when that comment has a reaction on it so I can clear my custom user field.
Happy to provide more details, if anyone would like.
HI @Brent Jenkins ,
Thanks for elaborating! That is indeed quite an interesting and very specific use-case.
Because I was intrigued, I did some research on this. Frankly, I came up empty. With Automation, you can get triggers on creating or editing comments, but not for reactions. That's pretty much the same events that are available to Connect apps.
When there's no event trigger, one can of course always use a regularly executed automation based on a JQL query and some condition. Unfortunately, you do not get any information about comment reactions in the Smart Values of Automation.
Finally, I wondered whether one could use Jira Expressions to get information about reactions. Here too, there's nothing to be found.
At this point I gave up – I guess you can upvote https://jira.atlassian.com/browse/JRACLOUD-78153, but apart from that I have no idea on how one would implement your use-case in a sensible manner.