Skip to main content
Solved

Creating Smart Group with Curl over XML

  • July 28, 2017
  • 1 reply
  • 0 views

Forum|alt.badge.img+7
  • Valued Contributor
  • 69 replies

Hi guys,

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

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

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>

Best answer by khey

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 original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+7
  • Author
  • Valued Contributor
  • 69 replies
  • Answer
  • July 28, 2017

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>

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings