Page thru REST api result set

Balu All April 6, 2023

Hello, I am trying to get a list of all the sprints in a given scrum board. Currently, there are more than 50 sprints. When I try getting a response from an API call, I am only getting 50 results back. How do I page thru the next set?

 

Example:

https://jira.cec.lab.emc.com/rest/agile/1.0/board/5756/sprint

 

The above call only yields 50. I know there are more than 50 sprints.

1 answer

0 votes
Kristopher Perez
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 6, 2023

So the developer documentation for the call is here - https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-boardid-sprint-get

And in that document there is mention of the ‘startAt’ parameter that can be added to the end point. Usually the next start at can be found in the JSON response to get the proper pagination.

The new url would look like this:

https://jira.cec.lab.emc.com/rest/agile/1.0/board/5756/sprint?startAt=$theNextBatch

im going off memory here, so I can’t remember if the next batch is just numbered or if it is the next sprintId, but that should at least point you in the right direction.

Reply back once you figure out which it is

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events