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,
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?
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
Just following up to check if the suggestions from Marc answered your question. If so, please consider marking this one as "answered". That will help others with a similar need find solutions faster. If not, please let the community know what help you need.
Thanks, and kind regards,Bill
It looks like you're new here. Sign in or register to get started.