Support more API profile query strings
To get information about a custom profile through the API the only option is to list them all and then filter out the required data.
https://api.simplemdm.com/#custom-configuration-profiles
On a SimpleMDM instance with 100+ profiles, requesting a single page of profiles takes a very long time.
curl https://a.simplemdm.com/api/v1/custom_configuration_profiles?limit=100 \
-u ${API_KEY}:
Running the above command takes around 20-30 seconds. However, if there were URL parameters available to map to profile attributes - ID, name, identifier, etc. - the API could return only the one or subset of profiles requested, in turn improving performance. It shouldn't take 30 seconds to return data about a single profile.
I'm asking for a few things here...
1. Add parameters in order to refine the profiles query. For example, https://a.simplemdm.com/api/v1/custom_configuration_profiles?limit=100&attributes.name=my.amazing.profile&id=4814&attributes.bundle_identifier=com.simplemdm.is.cool Any attribute returned by the API should be queryable. Having wildcard/like, greater than, less than, etc. operators a bonus as well, but not required.
2. Support the above for both custom and regular profiles.
3. (Optional) Optimize API performance for profiles lookup in general. Maybe there's a better way to query the database?
Marking this as completed to give voters their votes back but we will continue working on optimizations. Please feel free to submit new suggestions if there is something more specific you'd like to see.