cancel
Showing results for 
Search instead for 
Did you mean: 

REST Call to Process more results

TimBurns
New Contributor III

I have a question the REST API to process more results.

You can specify to process the next page of results, but I can find a way to keep appending the results from the previous call, so even if you process all the results, you only get the last page of the results from the GET REST API snap.

Does anyone have a solution for this other than right an external function?

1 REPLY 1

alchemiz
Contributor III

Hi Tim,

You can utilize the “Has next” and “Next URL” property of the REST Get snap

Here’s a example of what your REST Get snap should look like…

you have the initial request https://rest_endpoint/documents/stuffs?page=1

build an expression that will execute the next url … eval($entity.result.length > 0)

generate the next url ‘https://rest_endpoint/documents/stuffs?page=’.concat(parseInt(snap.out.totalCount) + 1)

image