Hello,
total noob here :).
I'm trying to use API to get result from a filter, but from all issues I want to only export certain custom fields. If I use this link in the same browser I use for jira:
I get what I want. However, when I use a linux machine to perform a curl with this command:
curl -u my@username:token -o /home/whatever/test.json --request GET https://mydomain.atlassian.net/rest/api/2/search?jql=filter=10861&fields=id,key,status,description,customfield_10571,customfield_10063
The file I get has all the custom field exported. The link that curl and I are pointing is the same, but the result is different. What am I missing?
Thank you!
Hello,
turns out that the problem was some missing apex. Some characters, such as "&", are not read correctly. What happened was that the curl cut everything that came after the & and it went with the default setting, which is to export everything from an issue. This can be fixed by putting the url between apex:
curl -u my@username:token -o /home/whatever/test.json --request GET 'https://mydomain.atlassian.net/rest/api/2/search?jql=filter=10861&fields=id,key,status,description,customfield_10571,customfield_10063'
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register today
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.