Forums

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

Using the incident API to link an Alert to an incident ticket

Ken Young October 30, 2025

Hello,

I am trying to use an Automation to "Link an Alert" to a JSM incident using the Incidents rest API (https://developer.atlassian.com/cloud/incidents/rest/api-group-linked-alerts/#api-jsm-incidents-cloudid-cloudid-v1-incident-issueid-alert-add-post).  I have been abel to use the Oauth gateway to get a bearer token with the correct Oauth2 Scopes  shown in the token (read:incident:jira-service-management

write:incident:jira-service-management) when it is returned.  However, when I attempt to use the api call later in the automation (but within the token timeout) and I provide the incident id (not the key) and the cloud ID, the alert isn't being linked and I am getting a 401.  I did this in the past, but this time I am trying to use a Service account instead of a user account to do the update.  Are there restrictions to user accounts in relation to calling the Atlassian API's?

1 answer

0 votes
Marc -Devoteam-
Community Champion
October 31, 2025

Hi @Ken Young 

What kind of API did you create, for this endpoint you can't use a scoped token as no "Granular" scopes are defined.

You need to create a full API token and that user requires to have the read/write permissions on the issue you want to link the alert to.

Scoped tokens only work when an API endpint has been defined with Granular scopes, see as example; api-group-customer 

And if a scoped token is created the API endpoint api.atlassian.com has to be used, see documentation; manage-api-tokens-for-your-atlassian-account 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events