Missed Team ’24? Catch up on announcements here.

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

Can't get JSM API call to work

Marius Vollrath
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!
May 3, 2024

Originally, I was trying to automize Opsgenie alert linking to JSM incidents, following this guide: Auto Link Alerts to Jira Service Management Incide... - Atlassian Community

The final step kept failing because of an authentication issue, so I started troubleshooting it by trying a simple API call:

https://%company%.atlassian.net/rest/api/2/issue/%issue-key%

Authorization: Basic <base64 encoded api key>

Content-Type: application/json

I'm using Postman for this and put the values in the appropriate fields.

I followed the guide here for the authorization topic: https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/#supply-basic-auth-headers

I created the API key with my user in the Atlassian Admin section and base64 encoded it using Powershell and the format myemail:apikey etc.

Still, I'm getting the error that either my supplied issue key doesn't exist or I'm not authenticated.

What am I missing?

Thanks!

1 answer

0 votes
Patrick Tripodi
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.
May 4, 2024

Hi Marius, 

You need to use an API Token instead of an API Key when using the Jira api. 

You can generate one here: https://id.atlassian.com/manage-profile/security/api-tokens and then encode that and try again.

Cheers,

Patrick Tripodi
GLiNTECH

Suggest an answer

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

Atlassian Community Events