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,559,112
Community Members
 
Community Events
184
Community Groups

Opsgenie and Postman - Maintenance with API

Hello all! I'm trying to be able to use Postman to create maintenance windows for our instances. I'm does not very familiar with Postman and am not having any luck. I have tried to follow this but I still get 401 error when trying to run it, any help would be appreciated. I think I just have the wrong genie key or API? 
https://learning.postman.com/docs/integrations/available-integrations/opsgenie/

image.png

2 answers

1 accepted

0 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 08, 2022 • edited

Hi @Derek Stevenson ,

Listing global maintenance policies should require no more than this request:

main1.jpg

 

The API key being used in my example is from a global API integration - meaning it's not assigned to any team. You should also be able to use an API key from the API key management tab.

If your Opsgenie is an EU instance, then you'll want to use the URL: https://api.eu.opsgenie.com/v1/maintenance

If that's the case, then using the US URL would probably show a 401 error.

Wow thanks that worked! like I said I'm not that savvy with postman yet, didn't realize we type the key as "Authorization" and add the geniekey xxx in value. Thanks so much!

Like Nick H likes this
0 votes
Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 08, 2022

Hello @Derek Stevenson

You should use Authorization header.
The value would be GenieKey XXXXXXX, where XXXXXXX is your API Key from Opsgenie.

Regards,
Eugenio

Wait sorry I'm a little confused like this? It doesn't work either i still get the 401 error. I'm using the default Opsgenie API that comes with account, should i make a separate new one for this?

image.png

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 09, 2022

You should use something like the cURL below:

 

curl --location --request GET 'https://api.opsgenie.com/v1/maintenance' \
--header 'Authorization: GenieKey XXXXX'
Where XXXXX will be your key. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events