Posted on 06-26-2022 04:12 PM
Hello,
I am new to jamf and api
I am trying to understand jamf api. I am trying to update the information under ios device - user and location - department. add or remove the information
here is the basic code i wrote from piece mealing from different place but no luck
Posted on 06-26-2022 08:29 PM
Your begining and ending tag is wrong. Instead of '<mobiledevices>' and '</mobiledevices>' it needs to be '<mobile_device>' and '</mobile_device>'.
Also, the department you use has to already exist in the Jamf Pro list of Departments (Settings -> Network Organization -> Departments), otherwise you'll get an error.
Posted on 06-30-2022 04:45 AM
@Silentgaming if you have time, I suggest you do this.
2 guys from Jamf technical services gave a presentation to a MacAdmins conference a few years ago where they outline how to query the Jamf API's in scripts. I watched both those videos and learn a TON! Grab a pot of coffee, some lunch and watch these two videos and they'll help. All in all, the total time is 2 hours invested in learning how to do this.
First one: https://www.youtube.com/watch?v=GKw0XbHx1GM&t=3459s
Second one: https://www.youtube.com/watch?v=xgSFxUMh7Dg&t=3740s