How to Access data from an REST API which has pagination as input parameters

Hello,

I am trying to load transaction data from a REST API end point. The API has pagination as required Input parameter. I am using the REST GET to fetch the data and the Https URL should be as below.

https://xxxxxx–xxx/transactions?datestart=2018-11-19T00:00:00&dateend=2018-11-20T00:00:00&pageSize=3&pageNo=1.

The issue is, the API doesn’t really give the total count of data and hence not able to breakdown the pagesize and page number.

Question 1: How can i fetch data with the above scenario if there are huge volume of unknown number of records?
Question 2: If i get to know the total count, Do i have to run the API for 2 passes with 1st pass to get total count and second pass to have a logic to loop thru the pagination dynamically? If so, What would be the best practice?

Thanks
Aravind N

Have you looked at: