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

Create alerts with alias through integration rest API

myron lioz August 13, 2020

Hi,

I am trying trying to create an alert in opsgenie using Logz.io integration

https://api.eu.opsgenie.com/v1/json/logzio?apiKey=XXXX

and JSON: 

{ "alert_title": "my new alert", "alert_description": "new alert description", "alias": "my alert alias"}

The alert is created fine but not with the specified alias. Why is this?

1 answer

0 votes
Robert
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2020

Hi @myron lioz !

 

I think the main issue here is the payload for two different "integrations" are being combined.

 

For the Alert API you have complete control over the alert fields and can set them in the request to Opsgenie.

 

For 3rd party integrations like logz.io, Opsgenie does not control the payload format being used. While you can "mock" a specific request using the integration's field (as you did in your post), the way those fields translate onto the alert is mostly determined by the integration settings:

image.png

So if you want to use this method to set an alias in the logz.io integration, what you'd really need to do is set the fields that make up the alert alias according to the integration settings in Opsgenie. That is, make sure the alias is set in the integration settings, then set the fields that make up the alias in the payload to Opsgenie. 

 

Does that help clarify why the request you sent wasn't setting the alias?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events