Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Link Request with Alert

Joanna
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!
September 5, 2024

Hey!

 

I would like to link an Ops alert (which I successfully created via a web request in the previous automation step) to the corresponding ticket that triggered this alert in the automation.

Something like: "Alert #9 is caused by Ticket-17" or "Alert #9 blocks Ticket-17". Is this possible?

Alternatively, is there a manual trigger that can link both together?

I would appreciate your help.

2 answers

1 accepted

1 vote
Answer accepted
Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2024

Hi @Joanna 

In Automation, you can do the "link" between an incident ticket and the alert using this REST API and the Sent Web Request automation component

https://developer.atlassian.com/cloud/incidents/rest/api-group-linked-alerts/#api-jsm-incidents-cloudid-cloudid-v1-incident-issueid-alert-add-post

The specific URL I use is 

https://api.atlassian.com/jsm/incidents/cloudId/{{jsmCloudId}}/v1/incident/{{issue.id}}/alert/add

In the URL, I am passing our cloudID of our jsm instances, as well as the issue id of the incident that was created.

In my use cast, the custom data that I pass is the alert

 

{
"alertIds": [
"{{alertId}}"
]
}

 

Since it is an experimental API at the moment, the headers you need to added to the web request

ExperimentalApi: opt-in

Accept: application/json

Content-Type: application/json

Authorization: {{Your Authorization method i.e. basic, token, etc.}}

 Remember to delay the execution of subsequent rule actions until you get your response.  It is an asych operation to "link" the alerts so you may to add a delay or some other way to pause if you wish to confirm that the alert is linked to the incident.

Good luck.  Hopeful there will be a "lookup alert" or edit alert that makes this easier.

 

 

Rodney Dsouza (Atlassian Certified Expert)
Contributor
November 15, 2024

You have the "ExperimentalApi" spelled that way,  while Atlassian seems to spell it "X-ExperimentalApi" (I have tried both and apparently one needs the X- up front)

 

The Authorization that worked for me was 'Basic' with my personal Token after encoding.

 

0 votes
DollyShukla March 27, 2025

What will be the value for -

jsmCloudId

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events