REST API to GET ALL Updated Issues

thorngje April 13, 2021

Using https://myinstance.atlassian.net/rest/api/3/search?updatedDate >= -3d

to get update issues.  However, it only returns 50 results.  When I do a search in my instance I have 375 issues returned.

I tried adding &maxResults to my REST call but only went up to 100?

Is there any way for cloud server to user REST API to get all the issues within the JQL results?

Thanks!

3 answers

1 accepted

1 vote
Answer accepted
Juan Manuel Ibarra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 13, 2021

Hello, unfortunately you cannot bring more than 100, what you have to do is use the paging https://myinstance.atlassian.net/rest/api/3/search?updatedDate> = -3d & maxResults = 100 & startAt = 100

This allows you to bring 100 tickets in several calls, increasing the value of startAt

you can do:

https://myinstance.atlassian.net/rest/api/3/search?updatedDate> = -3d &maxResults=100&startAt =100
https://myinstance.atlassian.net/rest/api/3/search?updatedDate> = -3d &maxResults=100&startAt = 200
https://myinstance.atlassian.net/rest/api/3/search?updatedDate> = -3d &maxResults=100&startAt = 300

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 13, 2021

Hi @thorngje 

I believe the REST API is limited to 100 records at a time maximum, and you would use the startAt parameter to iterate through them.

https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/search-search

Best regards,

Bill

James Anderson February 26, 2023

anyone has the code for iterating through a for loop?

0 votes
Carlos Garcia Navarro
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2021

Hi @thorngje , I agree with Bill and Juan Manuel's answers. To add some more context, there is this ticket from Atlassian that describes the issue and provides a workaround (the same that Bil and Juan Maniel shared):

https://jira.atlassian.com/browse/JRACLOUD-67570

Suggest an answer

Log in or Sign up to answer