Does anyone know if there is a way to use one API call to OpsGenie to create multiple OpsGenie alerts?
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.
Hi @Nick Haller 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.
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.