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

REST API Create Alert : No Owner despite user field filled

Romain Bonnot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2022

Hi,

I'm testing the Create Alert api : POST https://api.opsgenie.com/v2/alerts
Managed to create an alert but fail to provide a Request Owner.

OpsGeniePostmanCreate.png

OpsGenieAlertNoOwner.png


User exists and is visible in the List User API, not blocked, verified.

Tried with id, fullname, username in the json body, to no avail.

How can I change the Request Owner of an alert I create via Create Alert API ?

1 answer

0 votes
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2022

Hi @Romain Bonnot ,

It's important to note that Ownership is only given to a user when the alert is assigned to the user, or if a user ack's the alert. 

This can be done through our API with either the Assign Alert API, and somewhat through Acknowledge alert API - but realistically the user will want to ack the alert manually so users have better visibility. For example:

Assign Alert API:

asapi1.jpgasapi2.jpg

 

Acknowledge Alert API:

asapi3.jpg

^ When an alert is ack'd through the Alert API, alert shows the Alert API as the Owner.

 

Acknowledging an alert manually:

asapi4.jpg

^ Alert shows the user as the Owner.

Romain Bonnot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2022

Hi @Nick H ,

Thanks for your detailed answer !

It is indeed my actual process to use the Assign API but it forces me to await API result (well create alert requests are processed asynchronously so it wont really hurt performances) and make a secondary API call to Assign upon every alert creations.

Problem is, I want to create already assigned alerts and from the documentation the user field seams to be exactly what I need.

Can you confirm this field is ignored by the Create Alert API and there is no way to give ownership upon Create Alert call ?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2022

Hi @Romain Bonnot ,

It's not possible to assign an Owner at alert creation. Adding a user as a responder to alert via Create API will simply notify that user of the alert (/add them as a responder) - but the user still needs to acknowledge the alert to take Ownership:

asapi5.jpgasapi6.jpg

Suggest an answer

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

Atlassian Community Events