I am trying to get closed alerts how do I get those?
Hi @Shahanawaj Mulla ,
You could list closed alerts using a URL like this:
https://api.opsgenie.com/v2/alerts?query=status%3A%20closed
I believe this only pulls the 20 most recently closed alerts - so continue to GET more alerts with other URLs like these:
(Last* - would depend on the total alerts in your Opsgenie)
Related: https://community.atlassian.com/t5/Opsgenie-questions/How-to-get-closed-state-alert-by-alias/qaq-p/2488916
Can we use another key-like source to get a closed status alert? like source and status is closed
Yes - you can realistically query just about any field using a GET on closed alerts except the alias. For example:
To verify my query I typically test in the UI, then use a URL encoder so I know what to include in the API URL:
It looks like you're new here. Sign in or register to get started.