Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get closed alerts without using Id or Tiny?

Shahanawaj Mulla September 26, 2023

I am trying to get closed alerts how do I get those?

1 answer

0 votes
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2023

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)

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2023
Shahanawaj Mulla September 26, 2023

Can we use another key-like source to get a closed status alert? like source and status is closed

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2023

Yes - you can realistically query just about any field using a GET on closed alerts except the alias. For example:

get2.jpg

 

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:

get3.jpgget4.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events