Can individual feature edits trigger a webhook

1766
8
09-23-2020 03:33 PM
BenjaminSperry1
Occasional Contributor

I am trying to use a small script to make calculations when features are created or edited.

I can see webhooks at the item level for a feature layer collection but not at the individual layer level. 

Is it possible to trigger a webhook when a person edits or creates a record/feature?

Example:

A user creates a new point in a points feature layer in Collector. When they submit, a webhook recognizes it and sends a request to an AWS Lambda function that runs a spatial join on the point and a reference layer and then sets field values in the point based on the join.

I am using AGOL not Portal

Thanks

Tags (3)
0 Kudos
8 Replies
MattCreaney
Occasional Contributor

Yes - this example is integrated with Integromat Create a hosted feature service webhook 

0 Kudos
wwnde
by
Occasional Contributor

Thanks @Matt Creaney, I have been trying to create a webhook to send notifications when a feature service has been edited. I am on AGOL and not portal. The only step by step webhook creation docymentation I have come across is in this post. Say I have a feature service on AGOL, what is the step by step to create  a webhook?

0 Kudos
MattCreaney
Occasional Contributor

The link I posted has the steps I followed to setup a webhook for our AGOL feature service, I only use it on feature updates at the moment but it triggers on create or delete too.

0 Kudos
wwnde
by
Occasional Contributor

I have followed the link instructions to the letter but haven't been successful. Are you able to replicate your steps and share? Any help will be appreciated.

This what I did

I set a webbook URL in Azure. Checked it  by clicking on it and it worked. See the response below

In Post Man I put the following details in headers;

and the following in body:

I get the error

Any help @ Tyler Bragg@ Peter Klingman , @Matt Creaney

0 Kudos
MattCreaney
Occasional Contributor

I'm not familiar with POSTMAN as I worked directly on the admin directory for my feature server.  This way the token is generated automatically in the query string.

 

wwnde
by
Occasional Contributor

Thanks my challenge is getting to the administrator directory. Though I am an administrator all I get to is as folows. How can I get to the administrator directory?

0 Kudos
MattCreaney
Occasional Contributor

https://[server].ArcGIS.com/[instance]/ArcGIS/rest/admin/services/[feature_service]/FeatureServer/We...

if you use the URL from the services directory you were in you should be able to fill in the values enclosed in []

WilliamKalande
New Contributor III

All good. Done! Highly appreciate man