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.
what is your curl command?
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.
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?
It looks like you're new here. Sign in or register to get started.