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