Skip to main content
Solved

Creating Smart Group with Curl over XML

  • July 28, 2017
  • 1 reply
  • 3 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

1<?xml version="1.0" encoding="UTF-8"?>
2<computer_group>
3 <name>Test_xml</name>
4 <is_smart>true</is_smart>
5 <criteria>
6 <criterion>
7 <name>Computer Group</name>
8 <priority>0</priority>
9 <and_or>or</and_or>
10 <search_type>member of</search_type>
11 <value>Z-Google Chrome Install</value>
12 </criterion>
13 <criterion>
14 <name>Application Title</name>
15 <priority>1</priority>
16 <and_or>and</and_or>
17 <search_type>is</search_type>
18 <value>Google Chrome.app</value>
19 </criterion>
20 <criterion>
21 <name>Application Version</name>
22 <priority>2</priority>
23 <and_or>and</and_or>
24 <search_type>is not</search_type>
25 <value>60.0.3112.78</value>
26 </criterion>
27 </criteria>
28</computer_group>

Best answer by khey

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

1curl -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.

1curl -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