Forums

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

API request

snatarajan
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!
January 25, 2024

I'm having an use-case to query an Jira API from client tools.

For example, if I execute the below requests from the browser where I have logged in to my Jira account, i'm able to see the actual/all data in a JSON response:

1. https://<my-domain.atlassian.net>/rest/api/3/search

2. https://<my-domain.atlassian.net>/rest/api/3/search?jql=project%20%3D%20<KEY>

However, if I try to access the same URL's from Postman, Incognito window, Denodo, I get empty results for the first URL and the below error for the second URL:

{"errorMessages":["The value '<KEY>' does not exist for the field 'project'."],"warningMessages":[]}

Any ideas how to proceed on this?

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Nikola Perisic
Community Champion
January 25, 2024

Welcome to the community @snatarajan 

I tested with Postman, and these are the results:

Screenshot 2024-01-25 at 12.32.44.png

This is for the first url from Postman. Check your Postman "Authentication" window, make sure that you use "Basic auth" where your password is the Jira API key.

For the second url, I was also able to fetch the data:

Screenshot 2024-01-25 at 13.37.15.png

Make sure that in your query parameters you enter jql for your key and the value the actual JQL query.

snatarajan
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!
January 25, 2024

Thank you very much @Nikola Perisic. The API token (https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) did the trick! Once I create a new API token & provide it in the password section, both of the URL's works smooth. Thanks again!

Like Nikola Perisic likes this
Nikola Perisic
Community Champion
January 25, 2024

Not a problem @snatarajan !

Cheers,

Nikola

Suggest an answer

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

Atlassian Community Events