@dmitchell Webhooks will probably get you what you need (https://developer.jamf.com/webhooks). The ComputerAdded webhook is the one to take a look at for computers and MobileDeviceEnrolled for mobile devices.
@beckerbm That's a good starting point, thank you.
So, here's what I have setup for macOS: techs set all new machines up. Provisioning script collects a lot of information and populates into extension attributes, and saves them into a csv that is dumped in a shared location for a script to capture and create a record in our inventory system.
I also have several scheduled tasks (powershell scripts) that run daily/weekly/etc on some of our Windows servers to then query API and write to our inventory system or vice-versa. I also get notifications in Teams if a user enrolls their own machine so we need to follow up, have a regular clean-up task that will let us know if a mac hasn't checked in in 6 months, and will mark a device as unmanaged/delete depending on inventory system record.
I would recommend that you first figure out what you need to be able to ingest into your inventory system and then how you want everything structured.
- Is it all information that can be grabbed without touching the machine? If so, maybe you can just run daily queries/syncs.
- Will you have multiple tasks? If so, what kind of timing should you run?
- Do users have the ability to self-enroll? Maybe you need to distinguish somehow and know if it was set up properly or if a user enrolled themselves.
iPads would not be able to run scripts, so might need a separate query for that.
You can also view a lot of info on https://your-jps.com/api or https://developer.jamf.com/documentation. the macadmins slack #jss-api channel is also very active with people willing to help.