uapi - mobiledevicesmartgroup - read list of smartgroups?

New Contributor

How can i retrieve a list of mobiledevicesmartgroups? The api documentation ( only refers to search members of that groups (POST /mobileDevice/obj/smartgroup/{id}/recalculate), but not how to get a list of groups.

Or is there any other way to read lists of devices from jamf using the api?


Legendary Contributor III

I'm not sure what's up with the documentation you linked to. It looks very incomplete to me. I think it might be a work in progress. I would try hitting the built in documentation on your JSS directly for more information, as in

You can try the following in the shell, which works for me to pull the 3 default groups, even though we don't use our Jamf Pro setup to manage mobile devices.

curl -H "Accept: application/xml" -sfku apiusername:apipassword | xmllint --format - | awk -F'>|<' '/<name>/{print $3}'

Keep in mind this will likely pull ALL groups, Smart and Static. If you want to extract only the Smart Groups then throw in the following grep before the awk section.

grep -B1 "<is_smart>true"

Also, the JSS Resource URL may be slightly different in version 10.x. This is from a late version 9.x JSS. Meaning it might be mobiledevicesmartgroups instead of mobiledevicegroups. I'm not completely certain.

Contributor II

You can get a list of all Mobile Smart Groups by using the API


You can further get detail information about each Mobile Device Group by using the ID of each group


This will give you the Criteria of each Group
The Site of the Group
The mobile devices that are part of the Group (ID, Name, Mac Address, UDID, Wifi Mac Address, Serial Number)

If you use a Database to do this (like FileMaker Pro), you can link the Serial Number in the Mobile Device Group to the Serial Number of the Mobile Devices to get more detail on each mobile device when looking at the Smart Group.