Hi,
I'm trying to use a simple curl request to get details of an issue but it is failing with
{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}
I'm using the following Curl request
curl -D- \
-H "Authorization: Basic base64encoded(emailaddress:APIToken)" \
-H "Content-Type: application/json" \
"https://<site-url>/rest/api/2/issue/TEST-1"
If I hit the same url in a browser it works fine.
When I look at my API token dashboard I can see that the last accessed field updates to "a few seconds ago" when I make the curl request. If I put in a wrong base64encoded value I get an HTML response.
This command worked for me on a brand new cloud site:
curl -D- --user emailaddress:apitoken https://mysite.atlassian.net/rest/api/2/issue/TEST-1
Maybe wrong email, invalid issue, or the Content-Type header is throwing things. Try with the --user switch
I think that you need to pass through a method of GET, although I don't know what the syntax is like because I've never used Curl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. It defaults to a GET by default. I've making it explicit but that also doesn't work.
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.