I am trying to make some REST requests for my Jira Cloud instance and it doesn't seem to be working. Here are the steps I have taken:
curl -D- -H 'Content-Type: application/json' \
-H 'Authorization: Basic [base64 value here]' \
-X GET \
The response I get back appears to be an HTML unauthorized request page that has a link back to the Jira home page.
Is there some sort of authorization I need to do outside of creating an API key? The user account that I'm using has access to the project and issue I'm trying to fetch.
If you have created an API Token, then please run the request as it follows:
curl -D- -u EMAIL_ADDRESS:API_TOKEN -X GET https://subdomain.atlassian.net/rest/api/2/issue/ISSUE_KEY
(you can avoid the content type since it is just a GET request and you could avoid specifying the -X GET as well but I have put it there in order to avoid confusion :) )
For further details please see:
I hope this helps
I believe the documentation needs indeed to be fixed since in the "Simple Example" section it provides the same curl request but it is not specifying you need to use the email address instead of the username:
Yeah I think that was the confusion I ran into; this whole time I was using the username field instead of the email address. When I corrected the actual code in my program (that the curl request was emulating), all I had to do was change the configuration to use an email address instead of a username).
Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs