cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

REST API Paging Issue

mrcol
New Contributor

Hi, 

I have a REST API where the page index is passed in the request body. There is no indication of total records, so you must increment the page index in the request body until no records are returned. I cannot see how to do this via the pagination feature of the HTTP Client, and as such I have implemented the following:mrcol_0-1719433918308.png

The Router will pass through to output1 if records are found, which essentially links to input1 of the Union. The data all seems to be correct, but I always seem to get a java.lang.StackOverflowError on execution if there are records found and takes the output1 path.

I am aware this can be indicative of an infinite loop, but I am reasonably convinced my flow is correct, along with the data.

Is this the correct solution to this problem? If not, some guidance would be appreciated.

 

 

1 REPLY 1

alchemiz
Contributor III

Is the response entity in array? You can check the length of array e.g. $entity.length > 0