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
Community Members
Community Events
Community Groups

API Help - Get On-Calls

I'm very new to using API's. I'm trying to integrate our ticketing system : SCSM with Opsgenie.  I'm trying to use the "Who's On Call API"

The curl example shows:

curl -X GET ''
--header 'Authorization: GenieKey eb24alp-faa2-4ba2-a551q-1alpf565c889'

I'm using powershell:

Invoke-webrequest -Method Get -Uri '' -Header @{"Authorization"="GenieKey XXXXXXXX-XXXXX-XXXX-XXXXXXXXXXXX"}

I'm getting 

The remote server returned an error: (403) Forbidden.


Does anyone have any examples of using API's this way?


2 answers

1 accepted

0 votes
Answer accepted

I figured it out.  I had not properly registered the GenieKey for Authorization. 

For any other folks new to API's, this is what I learned:

The data returned is JSON. If you want to parse data out of the contents returned, this is how I did it:

$data = Invoke-Restmethod -Uri -Method Get -Headers @{'Authorization'='GenieKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}

# to get the username for example:



I hope this is helpful to anyone that was new to powershell / API's and Opsgenie API integration.

Hi @Scott Wright.

Could you help me with my request? I'm getting the same error when I'm trying to add note to alert.  

You may answer in my post:


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events