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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,003
Community Members
 
Community Events
176
Community Groups

Any Opsgenie api's to get list of alerts based on the time range

Edited

I'm trying to query the Opsgenie python API based on time range but I don't see any API that supports the action.

1 answer

1 vote
Nick H Atlassian Team Nov 30, 2022

Hi @Ashok Simma ,

Not a Python expert myself, but this is possible via the alert API using something like Postman - so I have to assume it should be possible with Python as well.

You can query between date ranges. For example if you wanted to pull alerts created in the month of November, you might use something like this:

https://api.opsgenie.com/v2/alerts?query=createdAt%3E31-10-2022%20AND%20createdAt%3C01-12-2022

queryapi1.jpg

 

I typically use a site like URL Encoder to help, but not sure what the Python format / query might be. I'm not sure if any of that helps, but again leads me to believe it should be possible.

Hi @Nick H  thank you for the reply. its working for me

Like Nick H likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events