Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a scenario to extract responses from a REST API on a daily basis. For this as per the API definition I have to provide query parameter as from_date and to_date hence responses for this particular period would be retrieved form the API and a max of 50 responses is included in a page. If this particular period have 100 records then it would be included in 2 pages.
The design what I implement only iterate to the first page and return 50 records , in order to get the whole records I need to call the Rest API one more time. That is another query parameter the API support to pass the page number ,so in this case I have to pass the page parameter dynamically two time .
I tried this requirement as like below
Firstly, with the date range I found the total number of page and save to a context variable (say 2)
then in the next branch I put one tforLoop and give the condition to iterate two times. The problem is I cannot connect tForloop to tRestClient. If anybody have some idea about to resolve this , Please share your suggestions.
Thank you.
I have written an article/blog which covers this with the Slack API. You can see it here....
https://community.talend.com/s/article/Sending-Slack-messages-with-Talend-part-2-Collecting-your-Slack-data?language=en_US
You are looking for the "Retrieving key Slack information to send messages" section. I repeat calls to the API and make use of a "cursor" in the URL which is constructed from the result of the previous call.