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
4,293,290
Community Members
 
Community Events
165
Community Groups

Alert creation via REST API

I am trying to create an alert via REST API. I am getting 202 response during alert creation and receiving response payload as mentioned in the API document. But, I don't see alert getting created in Opsgenie. I am stuck at this step and couldn't proceed further. Did any one face this problem?

2 answers

1 accepted

0 votes
Answer accepted

The 202 should have been returned with a Request ID. You can use the Request Status API endpoint with that ID to get the information on how the request was processed.

https://docs.opsgenie.com/docs/alert-api#get-request-status.

0 votes
Nick H Atlassian Team Oct 20, 2020

Hi @Santhosh Parepu 

A 202 typically means "The request is valid and will be processed asynchronously.
Unlike 200, it does not guarantee that the request will be handled successfully. You can check the Logs for the result" - https://docs.opsgenie.com/docs/response#response-codes

The Logs tab can be found under the Settings tab. You could then search for the alert's message, alias, request ID, etc. to check if the request is received by Opsgenie:

 

comm 202 3.png

 

There is a chance the alert is getting deduplicated as well - meaning the request is increasing the count of an already existing open Opsgenie alert (if the alias is matching): https://docs.opsgenie.com/docs/alert-deduplication

You could also use the alert dash to check if this alert does exist / is being deduplicate by creating a query for the message, alias, etc. https://docs.opsgenie.com/docs/alerts-search-query-help

 

comm 202 4.png

Try these steps and let us know if you are able to find the alert, or run into any other questions or issues.

-Nick

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

158 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you