Hi, the API comes back with the number of totalPages (say 10 pages), how can I loop the API call through all these pages (1,2,3...10) to get all data? Is there a tutorial I can refer? thanks, Song
Do you mean the FME Server API? Or just API in general?
If you make a request that tells you there are 10 pages to request, then you can clone the feature 10 times and then use the clone number to format a second request to get each of the 10 pages in turn. No need for looping. I would only use looping if there was no way of knowing how many requests were needed to be made in advance.
If you search for "fme httpcaller paging" you'll find some examples, including this one with a sample workspace by @bruceharold : https://community.safe.com/s/question/0D54Q000080hPDg/resolving-pagination-with-httpcallerloop
If you make a request that tells you there are 10 pages to request, then you can clone the feature 10 times and then use the clone number to format a second request to get each of the 10 pages in turn. No need for looping. I would only use looping if there was no way of knowing how many requests were needed to be made in advance.
Thank you, in addition, I added a decelerator on the second httpcaller to avoid being rejected by the server. Cheers, Song