Glenn McClenny
Member
A 3rd party API returns data in pages of 100 records, meaning if there would be 500 records in a json response, the rest API would have to be called 5 times passing the appropriate next page number. When the API is call, the end of the json response has the page info in it.
"resultInfo": {
"page": 1,
"perPage": 100,
"totalPages": 27,
"count": 100,
"totalCount": 2633,
"previousPage": null,
"nextPage": "/api/XXXX?PageSize=100&page=2"
},
How can I "loop" through the pages to update the appropriate JDE tables with all the records?
"resultInfo": {
"page": 1,
"perPage": 100,
"totalPages": 27,
"count": 100,
"totalCount": 2633,
"previousPage": null,
"nextPage": "/api/XXXX?PageSize=100&page=2"
},
How can I "loop" through the pages to update the appropriate JDE tables with all the records?