Hi @Rykie
The exact details of how your skiptoken
should be utilized depends on API you’re trying to use. Sometimes this token should be appended to the URL, like first if request was
https://something/endpoint?q=some
and that request returned skiptoken
in the body, like
{
....
'skiptoken': 'abcdefg123'
}
then next request should be:
https://something/endpoint?q=some&token=abcdefg123
, meaning everything stays the same except one more URL parameter appended with the skiptoken
value.
Sometimes, pagination is implemented in the form of next page URL being completely replaced with nextPageUrl
token from the prevoius step – that’s the case with Salesforce example. In this case, for example, if your first request was
https://something/endpoint?q=some
and that request returned for example nextPage
in the body, like
{
....
'nextPage': 'https://whatever/whatever?whatever=1234'
}
then next request should be:
https://whatever/whatever?whatever=1234
, meaning you don’t modify the original URL but blindly use next page URL that was given to you by the API.
The exact case depends on what says the documentation to the API you’re trying to use.
One more thing, about the REPEAT action - the key concept that may be causing the misunderstanding is how the iteration is implemented in EasyMorph. The first time a module is being called by REPEAT action it gets input dataset that equals to the dataset you push to REPEAT action. But the second, third and so on times the input dataset of the called module is the output of the last iteration.
See
https://easymorph.com/learn/iterations.html
the
Repeat action section.
So, you should determine:
- How exactly the URL formed by
Iterate Web Request
should look during the first call with initial input dataset? How should I make it look the way API expects it to be?
- How exactly the next page token/url is returned after the call?
- How do I make the output of the first iteration look so that, when fed to the p.1 instead of ‘input dataset’, the resulting URL for the
Iterate Web Request
should point to the query for the second page.
The iterations and their implementation in EasyMorph can be somewhat tricky