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/
Hi @Derek Stevenson ,
Listing global maintenance policies should require no more than this request:
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Derek Stevenson
You should use Authorization header.
The value would be GenieKey XXXXXXX, where XXXXXXX is your API Key from Opsgenie.
Regards,
Eugenio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should use something like the cURL below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OP is asking about connecting via Postman, not curl. The accepted answer shows the "Headers" populated with both an Authorization and Content-Type key-value pair which should be successful in authenticating and receiving results via Postman.
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.