JIRA REST API Quene Issue Pagination problem

Hi all, I have developed/designed a solution which retrieves data from Atlassian API using C#. This solution is retrieving information like Project, Issues inside Queues and Issue Changelogs. The solution pulls the data from the cloud using the API and put them inside an SQL Server database.

Usually everything runs smoothly, but some times there are errors which after some investigation seems to be violation of primary key inside the database. After some investigation I have started to believe that this is a pagination problem of the list.

For example, I am using this URL to retrieve the issues from a specific quene each time

https://xxxxxxxx.atlassian.net/rest/servicedeskapi/servicedesk/YYY/queue/000/issue?**start=0** and then


So I believe that during execution if the first call is calculated and a new issue arrives then the last issue of the first call will exists as first into the second call, because each call is independent from the previous one.

One solution could be to retrieve the issues in acceding order based on their key (currently Atlassian API returns the results into descending order) or to have a continuation list token which will make sure that you are getting a same sharpshot list besides the calls.

Anyone else with this problem?

Yes we hit this same problem. You can try generating lists of issue keys or IDs to fetch in batches to work around this. Or ask Atlassian to implement cursor-based pagination in Jira’s REST API and wait a year or two. Good luck!

1 Like