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.
![](https://secure.gravatar.com/avatar/07759527d8a42340c8b070a55341ac58?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
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).