My organisation has recently procured Jamf, and it's a majority Windows org.
I'm quite new to Jamf, but familiar with MDMs, and most of my day is spent using a Windows machine.
We have a number of applications that we have API access to, and I've been successful in setting up API access within powershell using client credentials, and able to make basic GET calls, and some simple POST commands - such as creating departments, or categories.
I have a list of departments I need to create, and want to also create smart groups for each of those departments, pulling in computers where the department is set to a specific value.
I've created a smart group manually and able to GET the configuration options in an API output.
My familiarity with API is using JSON for the POST calls, but looking at the GET output, it's an XML format, in a single string (weird to me, but maybe that's shell standard?)
However, I cannot get it to POST and create a group, when I modify the specific options from the GET output.
Even if I export the array as an XML file, and import it and pass that in the body, it rejects the format of the request.
For example, if a department is "Medical", I want the smart group to pull in if the department of the computer record says "Medical"
I've even tried passing that in a string as the request body, TNA:
New-JamfComputerSmartGroup -body "<computer_group><id>25</id><name>Department-Medical</name><is_smart>true</is_smart><site><id>-1</id><name>None</name></site><criteria><size>1</size><criterion><name>Department</name><priority>0</priority><and_or>and</and_or><search_type>is</search_type><value>Medical</value><opening_paren>false</opening_paren><closing_paren>false</closing_paren></criterion></criteria><computers><size>0</size></computers></computer_group>"
Anyone else had some success with this?