API to retrieve custom attribute values for all devices
I have to periodically examine and update (where needed) a custom attribute for all the devices in our fleet. This currently requires one API request (with paging) to retrieve the list of devices, and then one request for each and every device to retrieve the custom attribute value. With 2500 devices this is already prohibitively slow.
An API call that returns the custom attribute values for all devices would solve this neatly and speed up the code thousandfold.
Custom attribute values are now included in the response from the Devices endpoint. Use the query param to include custom attributes that have been marked as secret: https://api.simplemdm.com/#list-all-6
-
JCF commented
I am facing the same issue. I need to retrieve all custom attributes for all the devices in my organisation. Right now it seems I have to do one request per machine to get them all.
It would be much appreciated if the custom attributes were added to the response for "list all devices" (https://simplemdm.com/docs/api/#list-all-6). Maybe make a separate POST request to use filters?
Side note, the web interface that list all devices in the inventory (https://a.simplemdm.com/admin/devices) seems to have a way to retrieve these custom attributes all the while getting the list of all devices, all at once.
When clicking on the "next" page, you'll see a GET request made to " https://a.simplemdm.com/admin/devices.json "; that yields BOTH the device information AND the custom attributes.
As far as I can tell, there is no way to do the same thing on the API side currently.
The REST API could be improved to allow for "list all devices" requests to retrieve user selected attributes (names, custom attributes, installed apps).