how to delete packages and issues in bulk via REST API i see can only select 50 each time in JIRA UI

sunil August 5, 2019

Hi,

 

Would like to know how to delete packages, users,workflows and issues in bulk via REST API i see can only select 50 each time in JIRA UI

1 answer

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2019

Hi @sunil 

 

For issues you can change the value of the maxresults in your API's call.

Here the information that you can get in the doc

The "maxResults" parameter indicates how many results to return per page. Each API may have a different limit for number of items returned.

Here an example of a code, using Jira Python module (i just use a loop and play with the startAt parameter)

size = 100initial = 0

while True:

start= initial*size
issues
= j.search_issues('project = "your project"', start,size)
if len(issues) == 0:
break
initial
+= 1
for issue in issues: issue.delete()

 

By default the maxresult you can get is 1000 ins jira software, so you can override this limitation in your code, if you want so you will need to change the value in your instance.

Hope this helps

sunil November 6, 2019

Thanks for the information,

 

could you please let me know path to change the value of maxresult on Jira instance

sunil November 6, 2019

Hi @Mohamed Benziane 

Thanks for the information,

 

could you please let me know path to change the value of maxresult on Jira instance and also provide the option the export configurations like custom fileds and issues with all linked issues and attachments as we are doing migration of data from one instance to another instance in different network

General we do attch the attachment like https://1.1.1.1:8443/Simple.html

where our Jira instance dont have connectivity with 1.1.1.1:8443 .

Need to download all attachment with same name as mentioned in issue

Suggest an answer

Log in or Sign up to answer