Missed Team ’24? Catch up on announcements here.

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

One API call to OpsGenie to create multiple OpsGenie alerts

Kristin Woodson
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!
July 11, 2022

Does anyone know if there is a way to use one API call to OpsGenie to create multiple OpsGenie alerts?

1 answer

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

Hi @Kristin Woodson ,

The Create Alert API can only trigger one alert per request. It's not possible for it to create multiple alerts at this time. You'd have to configure some sort of job or script that triggers multiple API integrations to create multiple alerts.

But you can add multiple responders to the body of the Create Alert API to notify multiple teams, users, etc. like outlined in our doc:

{ "responders":[ { "id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c", "type":"team" }, { "name":"NOC", "type":"team" }, { "id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8", "type":"user" }, { "username":"trinity@opsgenie.com", "type":"user" }, { "id":"aee8a0de-c80f-4515-a232-501c0bc9d715", "type":"escalation" }, { "name":"Nightwatch Escalation", "type":"escalation" }, { "id":"80564037-1984-4f38-b98e-8a1f662df552", "type":"schedule" }, { "name":"First Responders Schedule", "type":"schedule" } ] }

Hope that helps.

Ed Osborn February 14, 2024

Hi @Nick H I have a similar problem. I trigger an opsgenie alert from a manual automation in JSM, which adds all support teams as responders. However, one alert that essentially CC's a bunch of teams isn't ideal. It means once one person acknowledges or closes the alert, it's ack'd or closed for everybody. It also makes reading the activity log of the alert a huge mess. 

I wouldn't think I'm the first person with this problem, do you have any recommended solution? I've considered having the automation cycle through a created-lookup-table in the automation, where the value of each key is the opsgenie team ID (we already use this table in another way), and having the for loop send the webhook for each line in the table, but from what I'm reading I don't think it will work. Open to ideas. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events