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
Next: Root
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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
From opsgenie alert-api, I am trying to get the alerts list for a particular team for last week Monday 8am to current week's Monday 8 am.
Can some one help me modify this query pls
response = requests.get('https://api.opsgenie.com/v2/alerts?query=createdAt%3A2019-04-29T08:00:00&teams=Site reliability&sort=createdAt&order=desc', headers=headers)
Appreciate the help
Hi there,
Thanks to contact with Opsgenie. You can use the following query:
https://api.opsgenie.com/v2/alerts?query=createdAt>1557129600+AND+createdAt<1557734400+AND+teams="Site reliability"&sort=createdAt&order=asc
For the time format we are using UNIX time stamp. And if you are searching for multiple queries "+AND+" should be used between them. (1557129600 for 06-05-2019 08.00.00 and 1557734400 for 13-06-2019 08.00.00)
Hope this helps to your API request. Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you might wanna pubish this in the API documentation. Kinda basic information for everybody, yet not mentioned there...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I meant the +AND+ part. That is something that many would need, yet I haven't found it described in the documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, yeah - an example there would be nice. Generally the documentation refers to https://support.atlassian.com/opsgenie/docs/search-queries-for-alerts/ (with no direct URL and one has to search it yourself) which kind of explains it and then you have to combine it with html encoding (+), yes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.