Try if you can make use of the Paging mechanism in the Rest Api ( offset and limit) , so that you will only retrieve a set of objects process it and then take another batch.
You can change the threshold limit for the warning as described in Mendix docs: https://docs.mendix.com/refguide/transient-objects-garbage-collecting/#:~:text=of%20a%20request.-,4.2%20Detecting%20Requests%20with%20Large%20State,-By%20default%20the
What kind of unexpected behavior are you seeing? In some cases I have used thousands of objects from rest calls without issues (I just turned up the threshold limit to not display the warning from 100).
Hi Radhwik,
You could try the following
Hope that helps,
Thijs