API call to get computer change records

krabople
New Contributor

We're looking to set up a near real time process to get change records for computers from Jamf into another system. I know very little about the Jamf Pro API, but I've downloaded the Postman collection. Is there an API call I can make that will just return any computers whose record has been amended in some way within, say, the past hour?

Failing this, which call should I use to get a full list of computers? The one I've currently been using is the {{baseUrl}}/preview/computers one, but I'm unsure what the 'preview' in this represents and therefore whether this is the correct one.

Thanks in advance for any advice!

4 REPLIES 4

AJPinto
Honored Contributor II

You don't want to do this manually. Is it possible to script? Sure, but the complexity of the script will be astounding as you would practically be writing a program. 

 

What you want to do is invest in a tool that is designed to do this. Something like Service Now can use Jamf API to map Computer CI's and keep the information up to date. Or if you are more looking at change management, you would want a SIEM tool like Splunk. 

 

The "near real time" part of your request is not really feasible. API basically works on a pull basis and not push. Your API tool will call Jamf on a check in (usually once a day), and update anything that needs to be updated. You can up the frequency of these check-ins, but it will massively impact performance of the applications involved.

 

TL;DR:

Use the right tool for the job or have a bad time.

Hi, thanks for the reply. I probably shouldn't have said near real time as this was a bit misleading. The plan is to call the API on a regular basis and then upsert records into a SQL database, where any changes will be picked up by BizTalk. This process itself isn't a problem for us to implement.

The only real query is whether there is an API call defined in Jamf Pro that will only return computer records that have been changed within a specified amount of time, and if not then which API call would be best to use to retrieve a full list of computers within Jamf.

cdenesha
Valued Contributor III

Hello,

I don't know if you can get that data from existing APIs, probably not.

However, you could look at webhooks. From what I understand (have not done it yet) Jamf can send your server an event with basic information, and then you can use the API. Our ticketing system uses it to pull current information when there is an Update Inventory on the device/computer.

chris

Thanks Chris, that's really useful and basically exactly what we're looking for. I'll have a look into the webhooks side of things, in that case.