We have been using Android Management APIs to enroll devices in an enterprise and provide restricted environment to our users. We have a requirement where we need to bulk update all the devices by making a patch request using this API: https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/patch
What I am looking for is that instead of sending requests one by one in an arbitrary fashion, is there any way I can send bulk requests and receive a response when all the devices are updated?
Note: I am already aware of how to do it one by one.
Help appreciated, thanks.
Use the
AndroidManagement.batch()API to queue several requests for execution and reduce the connections your client makes. The now deprecated Google EMM API documentation has more information about this.Here's a pseudo example on how to create a batch request, queue a device patch call and execute the request thereafter.
Please note that if you want to do a bulk update in order to save on the API usage limit, this will not help you. All requests in your batch will be counted separately when it comes to limits. There is no way around this.