Jira REST APIs not fetching all the issues

Hello, I am trying to fetch around 10K issues from Jira using Rest API using “maxResults” and “startAt” in JQL. While doing that I noticed that some of the records are coming twice and some records are not coming at all. Below is the JQL I am using. Has anyone faced the same problem or have any work around for this.

I tried reducing the batch size but still same behavior. Any help is much appreciated.

/rest/api/2/search?maxResults=1000&startAt=0&fields=issuetype,%20issuekey&jql=issuetype%20%3D%20Spike%20AND%20category%20in%20(%22Aligned%20Execution%22%2C%20%22Business%20Execution%22)%20ORDER%20BY%20created%20ASC

It’s possible the search indexes are not in-sync and you need to do a Full Re-Index on a cluster member and publish the indexes to the remaining nodes for consistency.

You can confirm this by bypassing any loadbalancer and targeting a single member at a time and comparing search results.

Thank you so much @sfbehnke. Tried this and it resolved the issue for me.

Very cool. Glad to help, I’ve had some of my users (who are doing API development) report similar things. The inconsistency is caused because API requests are not getting a “session”, they aren’t getting stuck to a SINGLE node, they are getting round-robined from good node to bad node.

For the record, at SpaceX we do a weekly reindex over the weekend and get the indexes published around. I advise similar workflow for your teams using Jira Data Center.