I am trying to get the watchers array out of a ticket using the Jira REST API. When I do the GET in a web browser I get the full watches element with the watchers array filled in. If I use curl I get the watches element but the watchers array is always []. Why would I get different results? BTW, I'm not providing an "expand" argument, just a straight URL like:
https://whatever.com/jira/rest/api/2/issue/PROJ-1234/watchers
Also, the same is true for an issue's votes and transitions.
It's:
curl -s --cookie-jar cookie.jar --cert servercert.pem --cacert certchain.crt -L https://my.jira.host/jira/rest/api/2/issue/PROJ-1234/watchers
Now I'm wondering if it has something to do with the cert. With curl I use the server cert that identifies my project. But in the browser, I'm using my own personal PKI cert. They both work but is it possible that one would return watchers and the other wouldn't? That sounds like a weird side effect.
I think there is a problem with authentication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you're right but why would I get similar results getting the issue from the REST API but not for an issue's watchers, votes or transition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is your curl command?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think there is a problem with authentication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.