AGOL Feature Service Webhooks

4023
33
07-07-2020 02:35 AM
JoshHarris
New Contributor III

Referencing the recent blog post which has introduced webhook to hosted feature services in AGOL. I was wondering if it was possible to use this to return the updates that have been made to the feature class. 

At the moment, it will tell me when a feature has been created, but I want to be able to pull the attributes of the feature that was created.

TIA

Tags (1)
0 Kudos
33 Replies
JoshHarris
New Contributor III

Hi Peter,

Thanks, I am getting the same error, but not consistently. I'm using 2.7.0 (aware of update). Originally it was just configured to FeatureUpdates, but I then switched to the wildcard to see if that would make any difference. 

Just an fyi, my original workflow was to calculate certain fields using python, and then capture these updates in the webhook. I noticed it wasn't capturing in the webhook so switched to Pro directly, to see if it would be captured there

 

Cheers

Josh

0 Kudos
Peter_Klingman
Esri Regular Contributor

Hi @JoshHarris thanks for the response on this. At 2.7.1 I can repro the error consistently so I did end up logging an issue for it. If you can DM me your customer number or shoot an email to pklingman@esri.com with that information I'll get your account attached. Re: calculating fields with Python, that should definitely trigger on FeaturesUpdated. Were you using ArcPy or the API for Python? Would be great to get an issue logged for this too.

Best regards,

-Peter

0 Kudos
SFM_TravisBott
New Contributor III

@Peter_Klingman - Just to add on to this thread of thinking, I have not been able to reproduce said error in Pro (2.7.1), as it lets me update the service just fine, but updating attributed via the Field Calculator does not seem to trigger the webhooks. My workflow is similar to @JoshHarris. When a record is marked 'Approved,' I would like a Survey123 Feature Report generated and emailed. I have the process set, and it triggers fine when edits are done in AGOL. But it's important to also have the ability batch approve records, which I had planned to do in the Field Calculator. 

Any insight would be appreciated. 

0 Kudos
Peter_Klingman
Esri Regular Contributor

Hi @SFM_TravisBott - Good timing, I actually just messaged Josh yesterday on this - I was able to repro calculating a field not triggering a webhook with all change types enabled. I logged ENH-000138947: Enable hosted feature layer webhooks to fire when fields are calculated for this functionality. From what I can tell, /calculate does not currently fall under the featureUpdated change type umbrella - this is why I logged this as an enhancement request rather than a bug. If you can drop me a private message or email pklingman@esri.com with your customer number I can get your account attached. 

Thanks,

-Peter