How to set the maxResults attribute in JIRA REST API?

Well, ye :slight_smile:

For example you set maxResults to 100, you have 1000 issues that pass your jql search, and assuming your startAt is 0.

You get first 100, check if result of request has exactly as much as maxResults. Then if you need all other issues you make another call, for your second call you can set startAt to be maxResults and now check again if you get exactl maxResults, then make 3d call with startAt equals what it was before + another maxResults. Or you can also add variable to track how much issues you already got and check with total to see if you still need to make requests.
But tl;dr ye, you need to make separate calls to get all data, so just set maxResults to maximum and then get all data in few calls, though be aware the more calls you make the slower jira migh get while your add-on is making calls, that’s ofcourse applies to very big sets of data, but that’s a good thing to be aware of it

1 Like