Jamf Blog

An Introduction to Webhooks

This session examined how webhooks can provide real-time triggered responses to events in the JSS.

Watch this JNUC session in its entirety.

Webhooks. What are they, and why do you need them if you already have an API? In today’s session, Jamf product experts, Bryson Terrell and Corey Honadel, explained it all. They discussed how to interact between scripts running on a web server and a JSS, and shared how webhooks can provide real-time triggered responses to events in the JSS.

Corey kicked off the session with a brief history of the Jamf Events API. This was introduced in the product to allow for custom plug-ins that could act on real-time changes in Jamf Pro. For example, the Events API could update another inventory system based on new device enrollment in Jamf Pro. While the utility of the Events API was clear, implementation proved to be more complex than desired.

With the introduction of patch notifications in Jamf Pro, Jamf admins wanted a simpler way to receive those notifications in other systems like Slack or HipChat. Webhooks was the obvious choice. At its simplest, webhooks defines a URL that will receive a POST request when an event occurs. They are language and platform agnostic, making it very easy to get started. As another benefit,

“Anything you write with webhooks will continue working if you migrate your Jamf Pro server to the cloud,” said Bryson.

Bryson holds a unique position, as both a Jamf employee and a Jamf admin. (He manages the Jamf Pro environment used to manage Jamf employee devices.) As you might expect, Bryson is a Jamf power user and began implementing webhooks to automate common tasks.

As an example, he showed a sample implementation for a chat relay that would post a message to HipChat when a managed device joins a smart group. This would be helpful in proactively catching issues like security compliance. The possibilities are endless,

“Think about other inventory platforms or a platform like Atlassian, Google App, Office365, Dropbox, etc.” said Bryson

When it comes to implementing the webhooks listener, it can be written in any language and deployed on any web server. Taking it one step further, Bryson showed an example of using AWS API Gateway and AWS Lambda to make a server-less deployment in the cloud. With a small snippet of code and a few steps inside Amazon Web Services, Bryson showed a proof of concept example.

For anyone running Jamf Pro and thinking of extending the Events API, this session is a valuable resource for getting started with webhooks.

Subscribe to the Jamf Blog

Have market trends, Apple updates and Jamf news delivered directly to your inbox.

To learn more about how we collect, use, disclose, transfer, and store your information, please visit our Privacy Policy.