My JQL:
assignee = currentUser() AND resolution = Unresolved order by updated DESC
How can I export all issues returned from above JQL to CSV file using Jira API?
Hi @[deleted],
Take a look at this End Point: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get
curl --request GET \ --url 'https://your-domain.atlassian.net/rest/api/3/search?jql=project = HSP' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
So in your case the URL should be:
https://your-domain.atlassian.net/rest/api/3/search?jql=assignee%20%3D%20currentUser()%20AND%20resolution%20%3D%20Unresolved%20order%20by%20updated%20DESC
This will get you a JSON response, which you need to format in a CSV style
In our URL we do not have atlassian.net
We have this: https://jira.OurCompanyName.com/
Will that be ok?
Ah, sorry thought that you had Cloud.
For server/dc you need to look here.
Which will lead to:
https://jira.OurCompanyName.com/ rest/api/2/search?jql=assignee%20%3D%20currentUser()%20AND%20resolution%20%3D%20Unresolved%20order%20by%20updated%20DESC
Note the '2' instead of the '3'
So can I use below code?
curl --request GET \ --url 'https://jira.OurCompanyName.com/ rest/api/2/search?jql=assignee%20%3D%20currentUser()%20AND%20resolution%20%3D%20Unresolved%20order%20by%20updated%20DESC' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
It looks like you're new here. Sign in or register to get started.