Posted on 10-22-2021 04:14 PM
Hello,
I have been looking everywhere for this information, but I have not had any luck. I am fairly new to working with APIs, so I was hoping to get some information from Jamf Nation. It appears that many solutions are outdated and do not work on my latest machines. This post by @mm2270 seems like the closest to what what I am looking for, but it does not work.
What I want to do: First, I would like to get a list of items from the API. Sites, buildings, departments, whatever. Sometimes I get IDs, sometimes names, but that is me being unfamiliar with awk, grep, xmllint.
Next, I would like this list of items to be presented in a popup menu to be selected. I'm guessing the only way to do this without installing additional software is AppleScript. I have gotten this far with some testing, but the popup only shows the first item in the list. I'm not sure if I can display this list from a variable or does it have to be saved to a file or what.
Lastly, I would like these selections to be sent to Jamf Pro to update the computer record.
If anyone can provide any information on what I may be doing wrong or where I can look to find a solution that works on macOS 11 or later.
Thank you,
Gabriel