Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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
https://xxxxxxxx.atlassian.net/rest/servicedeskapi/servicedesk/YYY/queue/000/issue?start=50
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?
Hi @Stavros Koureas ,
Welcome to the community!
Yes, this is a common worry. We typically try to work around this by either requesting a larger amount of issues up-front or by carefully picking the order in the JQL itself. If you want to be extra sure, you can also enforce that the issue key or issue id is unique within your C# application.
Hope that helps,
Oliver
P.S. There's also https://community.developer.atlassian.com the developer-specific community. That's usually the better place to ask this kind of question.
Hi @Oliver Siebenmarck _Polymetis Apps_ , thanks for your confirmation of the issue and your suggestion, but currently I have developed the solution using the RestAPI using Quenes (many Quenes), not JQL and therefore I am not able to specify the order. Yes currently I am manage this issue inside C# application, but this is not always very strait forward because I am running C# though integration services and it would make things simpler.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.