JIRA rest API pagination - Same issues returned on different pages

Phu Viet Bui
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 15, 2023

Hi all,

I have a query that returns more than 2,000 issues, for example 2023. I use pagination methods to retrieve those issues (with maxResults both 100 and 50). However, when I track the extracted issues, its total number is 2023 (this shows it has gone through all pages) but there are repeated issues which I doubt those issues are on different pages. 

Since the total amount of issues is consistently 2023 after runs, I think this is not due to new issues added which leads to altering issue order.

Can anyone give me an advice? 

Thank you,

1 answer

0 votes
Marc - Devoteam
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.
September 15, 2023

Hi @Phu Viet Bui 

Welcome to the community.

As I understand per your description that you have more than x amount of issues returned by a JQL query and would like to use pagination in your REST call to return all of your issues.

You can use the pagination parameter "startAt" to specify the starting issue returned in the JQL results, so you will be able to run multiple calls returning 1000 issues sequentially.

Let me give you an example:

Let's suppose you would like to return in your REST API all the issues assigned to Charlie by order of creation, however, Charlie has 2500 issues. You will be able to return all the issues by running the three following calls:

The max number of issues returned can change sporadically, so check in your REST API call if that number is still 1000 by default.

Additionally, you can use the "maxResults" parameter to define the number of issues returned if you want a different value (< 1000).

You can check the documentation below for more details about the pagination examples and parameters provided:

Expansion, Pagination, and Ordering 

Phu Viet Bui
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 15, 2023

Hi @Marc - Devoteam ,

Thanks for your answer. I was able to retrieve the same amount of issues as I have. However, when I check for detailed list of issues, I recognize that one issue happens twice which I doubt that issue presents in different pages.

One more update, the maxResults now is 100 only. 

Like Marc - Devoteam likes this
soumya awasthi July 10, 2024

Hi @Phu Viet Bui 

Where you able to find the solution to your problem. I am facing the same issue.

Thank you in advance

 

Suggest an answer

Log in or Sign up to answer