Hi all, I cannot get past this 404 error.
I am at a loss, please help.
There are two places to generate APIs within the Atlassian cloud environment.
I was trying to use the later, not realizing the former existed..
Perhaps, it will help someone but in my case - I had quotes around the token - and they were being read in. Once removed - it all worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Cameron,
This is an interesting issue. I tried the following curl and was able to reproduce your results (the 404 error).
curl -v -u "user:pass" \
--url "http://localhost:8080/rest/api/3/issue/DEMO-1"
I then changed the API version to 2 and it worked as expected.
curl -v -u "user:pass" \
--url "http://localhost:8080/rest/api/2/issue/DEMO-1"
This is a bit curious as I have never come across this before. I checked the Atlassian documentation and both version 2 and 3 support the same authentication. According to the documentation, the difference in versions should not make any difference when it comes to authentication.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#version
When I compare the verbose response from the curl, the only difference I see that sticks out is the "content security policy".
I tried this using a different Jira version (going from Jira 8.22.6 to 9.4.2) and neither version worked. However, I still see the "self" content security policy when the curl request does not work. I searched Google for "jira rest content security policy" and am seeing some interesting results. I believe this would be the place to start.
See this Atlassian documentation on Jira security headers. I believe this will resolve the issue.
https://confluence.atlassian.com/jirakb/security-headers-in-jira-939919914.html
Here are some suggested troubleshooting steps:
Please let me know how it goes!
Hyrum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for your response Hyrum! Unfortunately I am new to postman and API calls. I tried changing the get request to rest/api/2/, with no luck. I am using cloud so I cannot change the version of the Atlassian environment.
I'm not sure what you are asking here,
But. I know what curl is and where to find the code snippet in postman, and what Atlassian recommends.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure thing, Cameron!
If you are using Jira Cloud, then none of the troubleshooting steps I suggested above apply. I tried a basic REST call using Postman to my Jira Cloud test instance and the only way I could make it not work was to pass incorrect authentication. Try creating a new API key and test again.
When using curl, the verbose flag is useful in troubleshooting because it returns additional information you normally would not see. Here is what it looks like:
curl -v
Here is what my curl looks like after I exported it from Postman.
curl --location 'https://<BASE_URL>.atlassian.net/rest/api/2/issue/EX-1' \
--header 'Authorization: Basic CALCULATED_HASH'
Long story short, I think your Postman configuration is just fine. Check the authentication.
Hyrum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Turns out, I was trying to apply the org management API key from Atlassian Admin, not the one from my own Atlassian account. We got there, Hyrum! Thanks again for trying to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.