08-08-2017 08:56 AM
Hello Forum,
I have a input document like this:
[
{
"count" : 10
}
]
and I need to invoke child pipeline using Pipeline Execute snap 10 times. If count is 5, I need to execute child pipeline 5 times.
How can I achieve this? Thanks in Advance!
08-08-2017 09:12 AM
What is your usecase?
08-08-2017 09:20 AM
We are querying tickets from Zendesk API and it does not return all the records in one call but gives the url to use in the next HTTP call to get the next set of records.
Sample response from the first call:
{
"tickets": [ ... ],
"count": 1234,
"next_page": "https://account.zendesk.com/api/v2/tickets.json?page=2",
"previous_page": null
}
In this example, I need to make calls to their API until next_page
is null
or 12 times (1234 /100, because each call returns only max of 100 records).
Here is the url to their documentation if you want more details: https://developer.zendesk.com/rest_api/docs/core/introduction#pagination
Please throw some inputs on how this can be done? Thanks in Advance!
08-08-2017 10:05 AM
You further need to look at how to implement pagination on the REST Get snap.
Rest get snaps support pagination.
https://help.zendesk.com/hc/en-us/articles/229489028#add
Take a look at this blog.
This clearly describes how to implement pagination. This may not be exactly similar for the ZenDesk APIs but you will get the idea.
08-08-2017 10:31 AM
Great! I did not know about this. I will look into it and come back with more questions, if any 🙂 . Thanks again!