Example Smart Group Creation via Jamf Pro Server API

luisgiraldo
New Contributor II

The below XML will allow creating a Smart Group via the Jamf Pro Server API.
Credit: Elliot Jordan, Linde Group, AutoPkgr

<computer_group>
    <name>GroupName</name>
    <is_smart>true</is_smart>
    <criteria>
        <criterion>
            <name>Application Title</name>
            <priority>0</priority>
            <and_or>and</and_or>
            <search_type>is</search_type>
            <value>NameOfAppInJSS</value>
        </criterion>
        <criterion>
            <name>Application Version</name>
            <priority>1</priority>
            <and_or>and</and_or>
            <search_type>is not</search_type>
            <value>VersionNumber</value>
        </criterion>
    </criteria>
</computer_group>
3 REPLIES 3

leslie
Contributor II
Contributor II

I have the following project (work in progress). The app is used to create or modify static computer or mobile device groups. Provide a list of devices, one record per line, identified by either serial number, MAC address, or name along with the JSS URL, appropriate credentials and group name then off you go. Watch out for special characters in the password of the account used.
https://dl.dropboxusercontent.com/u/62158140/Static%20Group%20Helper.zip
8be37db583914a5d921731e25daa4a86

luisgiraldo
New Contributor II

@leslie, is the code for this open source? Github? Please send me an official link if it's OK to share it in my session notes on Thursday!

leslie
Contributor II
Contributor II

@luisgiraldo - Afraid I haven't set up a Github or open sourced the code. Currently the dropbox link is what I have to share it out.