Creating Smart Group with Curl over XML

khey
Contributor

Hi guys,

Am trying to create Smart Group over curl with the following attributes.

24991c7d5b1441f59e185d9f7bd3827e

However, its not as expected because of the missing bracket.

ac9ed50f2af649c6807eebdec1703452

How do i get bracket included in xml?

Thanks

<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
    <name>Test_xml</name>
    <is_smart>true</is_smart>
    <criteria>
        <criterion>
            <name>Computer Group</name>
            <priority>0</priority>
            <and_or>or</and_or>
            <search_type>member of</search_type>
            <value>Z-Google Chrome Install</value>
        </criterion>  
        <criterion>
            <name>Application Title</name>
            <priority>1</priority>
            <and_or>and</and_or>
            <search_type>is</search_type>
            <value>Google Chrome.app</value>
        </criterion>
        <criterion>
            <name>Application Version</name>
            <priority>2</priority>
            <and_or>and</and_or>
            <search_type>is not</search_type>
            <value>60.0.3112.78</value>
        </criterion>
    </criteria>
</computer_group>
1 ACCEPTED SOLUTION

khey
Contributor

Found a way to get the xml of existing smart groups to see the xml.

curl -skfu username:password https://yourjss:8443/JSSResource/computergroups/id/<group id>

View solution in original post

1 REPLY 1

khey
Contributor

Found a way to get the xml of existing smart groups to see the xml.

curl -skfu username:password https://yourjss:8443/JSSResource/computergroups/id/<group id>