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
Using the OpsGenie REST API, how can I get a list of alerts acknowledged by a user (regardless of whether or not they were first to acknowledge it)? Currently, the 'acknowledgedBy' query param field doesn't seem to keep track of all users that acknowledged an alert. Instead, it only keeps track of one (it seems like whoever is the first to acknowledge it, but I'm not sure).
Consider the following example: User A acknowledges alert X, and then a few hours later our on-call schedule shift changes, so then alert X is unassigned from User A and it is alerted to User B, at which point User B acknowledges it.
I want to be able to individually query all of the alerts acknowledged by each of these users (A and B) via API and have the above example alert X show up in the list of acknowledged alerts for both User A and User B since each of them acknowledged this alert (regardless of whether or not they closed it- acknowledgement is all that matters to me in this case).
In the context of the above example, I have tried using the following query param (assuming User B's email is userB@mail.com):
acknowledgedBy = "userB@mail.com"
But this does not necessarily return alert X in the results as multiple acknowledgements don't seem to be tracked per alert, as mentioned above in my problem statement.
The recipient and owner fields also do not seem to help here since they are just singular strings too, as documented here.
I have searched through lots of documentation and community posts and cannot find a solution for this use case issue. How can this desired result be achieved with the API?
Hey @Jack Ford
Thank you for posing your question. I'm Arumugam from Atlassian Support and happy to help.
I understand you'd like to compile a list of all alerts acknowledged by a user, even if the action was subsequently reversed.
Regrettably, it's not possible to query these values using the List API, as only the most recent values can be used as a search parameter.
If an alert was acknowledged and then reverted back to open status, you can use the logs API to record all related events. You can then compile or save user and alert IDs or other information for further analysis.
Here is a screenshot for your reference:
I hope this helps. Please let me know if you have any other questions.