If you make use of feature services, ArcGIS Enterprise or ArcGIS Survey123, and you’re into automation, you may have heard of webhooks. What exactly is a webhook? This term describes a particular pattern of web communication between two applications: a source application and a destination application. The source application is where something happens, generating an event. This event causes a message to be sent to the destination application. The destination application must receive and do something with that incoming message. This something could be a notification, an email, etc. – the possibilities are endless. Generally, the term webhook applies to the entire end-to-end process connecting these two services.
For a webhook example in ArcGIS, consider an ArcGIS Experience Builder web application that permits hosted feature service editing. As individuals make edits in the app, the feature service is updated and a webhook configured on the underlying hosted feature service itself sends a message about those edits to a webhook receiver. The receiver has been configured to send an email notification every hour reflecting all the new edits. Contrast that scenario to one in which you would either need to manually check for new edits or run a script and identify new features added to the service: webhooks offer a proactive, automated push-like notification service.
In ArcGIS Enterprise, there are two types of webhooks: service webhooks and organization webhooks. Webhooks can also be configured to integrate with ArcGIS Survey123. Read on for more details about each of these types of webhooks.
Service webhooks
You can create a webhook from the ArcGIS Server Administrator Directory on both geoprocessing and feature services. These webhooks are triggered by specific interactions within each service, causing a message to be sent. These messages include a callback URL where further information can be collected from the service.
Geoprocessing service
You can create a webhook on asynchronous geoprocessing services. After the service finishes running a task, a message is sent to the receiver. The message includes information on if the job succeeded or failed and a callback URL to the results and message for the finished task.
Learn more about geoprocessing service webhook.
Feature service
You can create a webhook on both hosted and by-reference feature services. The webhook can be configured to send a message when edit operations, such as create, update and delete events occur. Hosted feature services also support triggers such as schema and definition changes.
Note: Webhooks configured on Enterprise hosted feature services work similarly to ArcGIS Online hosted feature service webhooks.
Learn more about feature service webhooks.
Organization webhooks
You can create a webhook in the Enterprise portal to listen for events on items, users, groups, and roles. For example, a webhook can be configured to trigger when a specific user signs in to the Enterprise portal or any content has been shared to a group. There are dozens of triggers that you can configure to act on users, items, and groups either broadly or specifically.
Learn more about organization webhooks.
ArcGIS Survey123
You can integrate Survey123 with ArcGIS Enterprise, making use of hosted feature services, similar to Survey123 in ArcGIS Online. Webhooks can be configured to trigger when either a new survey has been submitted or updated. The Survey123 webhooks operate the same with both ArcGIS Enterprise and ArcGIS Online.
Lean more about Survey123 webhooks.
Webhook receivers
Any discussion of webhooks is not complete without talking about the webhook receiver. The receiver discussion is often more important than the actual webhook configuration itself as this will be the part reacting to the message and starting automation or sending notifications. You can point your ArcGIS Enterprise webhooks at dozens of subscription or limited trial webhook receiver websites. Power Automate, from Microsoft, has Esri-provided connectors that allow you to set up feature service webhooks, pull information about the changes that occurred, and provide tools to send emails, team messages, integrate with other business systems or make HTTP requests back to the original service. Alternatively, you can set up your own webhook receiver with some code. Explore the GitHub repository for examples. Stay tuned for a future post specific to webhook receivers and a deep dive on feature service webhooks.
Article Discussion: