Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Data fetched through API

Mayur Gaikwad_Tech PMO
Contributor
January 16, 2025

Hi,

Whenever we call a GET status API, does the sequence of call IDs changes in response everytime we hit?

Because, Im trying to load these fetched information in a table and I'm getting duplicate records. This is done at a batches of 100 records at a max and seems some calls are getting fetched in each of the batches resulting to duplicate records.

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.
January 16, 2025

Hi @Mayur Gaikwad_Tech PMO 

What call are you making?

If you need more then the first 100 results, you need to use pagination in your calls.

See, API pagination 

Mayur Gaikwad_Tech PMO
Contributor
January 16, 2025

@Marc - Devoteam How can i achieve pagination in URL, like its a GET status API, i cannot pass this in body as a request, right?

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.
January 16, 2025

So then you need to make a new call, that specifies startAt=101 at the end to get more results then the first 100

Mayur Gaikwad_Tech PMO
Contributor
January 16, 2025

Yes, Im doing that but its in URL, and when doing so, it seems few call IDs are coming in 2 or more batches causing duplicate record issue

 

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.
January 16, 2025

Hi @Mayur Gaikwad_Tech PMO 

What is the JQL you are using in the Get action, does it use and order by clause?

If it doesn't duplicates can occur.

Like Mayur Gaikwad_Tech PMO likes this
Mayur Gaikwad_Tech PMO
Contributor
January 16, 2025

Let me try adding the order by clause, but is there a 'distinct' or 'unique' identified that can be used with order by clause?

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.
January 16, 2025

Hi @Mayur Gaikwad_Tech PMO 

Loads of options.

Order by key, due date, ..., see ORDER-BY 

Mayur Gaikwad_Tech PMO
Contributor
February 12, 2025

Hi @Marc - Devoteam 

Tried Order By clause but still getting duplicate records

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events