Hi,
I am using Iterative Macro to download the records from API in Json format and I need to call the macro 3-4 times to get the correct number of iterations and number of records. If I call the same macro with same URL again and again it gives different results such as exact whole number of records like 1000,2000,5000,7000 etc randomly each time .
For example:
I am expecting "TotalCount":14707,"TotalPages":15
First time when i call the Macro i have received 2000 records and 1 iteration
2nd time 11000 records and 10 iterations
and so on .. and received the correct number of records after several attempts.
I have tried throttle records , records per minute :25 and maximum connections :2 in the download tool connections settings. But, still no luck.
Appreciate your advise on this.
Thanks
Hsac
hi @harinder1301,
Is this a public API? Are you able to share the tool/workflow at all so i can investigate on my side?
Thanks,
TheOC
Hi @harinder1301, if you open the macro and run the first iteration there, do you get different results each time as well?
Thanks for the reply. It is not public API.
It displays 1000 records only when i run this Macro directly and random records when i call it from an another standard macro.
Try inserting a Browse tool on both output anchors of the macro and see if you still get different results each time.
Yes,It is still giving the same number of records .
How it's determined the number of times the macro will run? Is it based on the number of pages? If so, maybe try to investigate if the API is returning the correct number of pages.
Yes, loop is based on the Nextpagelink. It was working ok till December 2021.
X-Pagination: {"TotalCount":14707,"TotalPages":15,"PrevPageLink":"","NextPageLink":"https://website...&pagesize=1000&pageNumber=1"}
hey @harinder1301
Do you happen to be using AMP engine?
Cheers,
TheOC
Thank you everyone for your help. There was an invalid character in Downloaded Header sometime. It is fixed now.