I’m having some issues in regards as to how to approach handling pagination when creating a channel and accompanying datamappers.
The issue I’m trying to solve is trying to set up a channel that queries a MDM device portal and is to act as a sort of CMDB gateway for our phones. However, the MDM portal (Workspace ONE UEM API) pagination is hard set to a max value of 500, and I need to check for updates on a total of ~ 12000 devices.
The version of the API I‘m currently integrating with only has GET requests available, and using the regular HTTPS channel and datamapper I’m unsure of how to iterate through the pages of the response. The endpoint URL is https://….net/API/mdm/devices/search
The page number is returned in the last section of the JSON response:
…
"page": 1,
"page_size":500,
"total": 10
}
However, I’m usure of how to use this part of the response to get the next page when using a HTTPS channel.
To get the phones created as items I’ve performed a manual workaround by updating the channel Endpoint URL to manually step through the pages (https://….net/API/mdm/devices/search?page=0 → https://….net/API/mdm/devices/search?page=1, etc.) But this can hardly be the best method to solve this issue.
I’ve seen there is an idea proposed, where this would get better supported out of the box:
However, how has this issue been addressed with the current limitations in place?
Is it possible to change to the next page or perform other dynamic operations from the result fetched by a datamapper?
Has this problem been solved using a different approach?