How to get a Mulesoft application to page large volumes of data without resetting
Recently I’d been developing a Mulesoft application that uses another as a source API. The response from the source API looks something like this:
{
"nextLink": "https://server:port/external-api/endpoint?page=1",
"nextOffset": 1000,
"morePages": true,
"totalRows": 12345,
"totalPages": 13,
"results":
[
{...}
]
} There are a few things that could potentially be used for paging the response data. As a .NET engineer, I would have approached it by using a While or Until loop on ‘morePages: true’, used the nextLink URI and appended the response payload to a typed list.