A sample node app that can receive and process hosted feature service webhooks. This example shows the complete workflow to receive the payload and make additional authenticated requests to get the actual features that were edited. The edits are printed to the console.
- Ensure you have installed Node.js
- Install dependencies with
npm install - Create and configure a
.envfile with these properties:
PORT=3000
SIGNATURE_KEY=<your key>
USERNAME=<your username>
PASSWORD=<your password>
PORTAL=https://arcgis.com/sharing/rest
- Run it locally
npm run serve
A Dockerfile and docker-compose.yml file are provided to make it easy to deploy on a server.
- Run
docker-compose up --buildto build an image and launch a container that runs the receiver.
-
In ArcGIS Online you can create a hosted feature service webhook and provide the URL and signature key to your webhook receiver (e.g.
https://<hostname>.<domain>.<tld>/webhooks/receive) -
Deploy the receiver on a publicly accessible server that can has the specified port opened.
-
Add or edit a feature. You should see the edits printed to the console.