Hi all,
I'm trying to set up a Feature Service Webhook in ArcGIS Enterprise 11.1. The webhook should send a POST request to a custom receiver when a feature is created. Setting up the webhook is possible, but when I create a feature there isn't any request sent.
I tested with the same custom receiver and an ArcGIS Online webhook. In this situation the post request is sent correctly. I assume that it can't be related to CORS since it works in this situation and I also added the hostname of my ArcGIS Enterprise server as an allowed origin to my custom receiver's web server (Apache). And I'm able to send a post request to the custom receiver from the ArcGIS GIS server machine manually.
Port 443 is open in the ArcGIS Enterprise network. The whole ArcGIS Enterpise installation is behind a KEMP reverse proxy/load balancer.
Does anyone have any ideas?
Hey @KevinHibma,
Thanks much for the prompt response!
In response to the first note - that makes sense. I'm not tied to synchronous processing for this service in particular, so can definitely explore moving it over to "Asynchronous" (assuming that might resolve this initial hurdle).
As far as the payload type is concerned, I am happy to handle any formatting issues via my own code at this time, although this is good to understand moving forward. Do you know, is url-form-encoded the only supported delivery method for GP services? This would make sense as I've been able to test my service using Postman with a successful execution run (assuming Postman is delivering the data in the correct encoding.
Thanks again!
Alex
Yup, Async should get you past that.
Postman will absolutely be doing the correct thing sending to your service.
You can set the webhook to send as JSON, but I'm 99% sure that you can't "get" the value into the gp service as JSON via this trigger. It needs to come in as a form which would match a parameter on the GP Service.
You can test sending your webhook payloads to https://webhook.site (free interest testing resource). This should give you an idea of how the payload as a form comes in. From there you might be able to determine how your code could handle that.
Interesting.. that's all good to know as I had been wrestling with the appropriate delivery method (Webhook format vs GP parameter type(s)).
My additional webhook configuration on the same Service is actually through webhook.site, so glad I'm using something familiar.
Last question for the time being.. (thank you again). Switching my GP Service over to Async is now preventing me from updating the webhook registration via "/arcgis/admin/services/...".
Unable to create or update webhook. URL is not reachable: https://server_url/arcgis/rest/services/folder/WebhookHandler/GPServer/webhook_handler/submitJob for webhook GP Server
Could you elaborate on what Server is actually doing when you click "Create" or "Edit"? I know during initial webhook creation it will fire off a simple payload ({webhook: webhook name}) and I'm assuming it's looking for a 200 response to this initial request, and perhaps testing TLS authenticity? I am surprised to see that I'm unable to set my HookUrl to the same GP service, just the "/submitJob" endpoint for Async versus "/execute".
That's odd.
When you click create or edit, it's sending a HTTP message to that URL to check that 1) it responds and 2) its trusted (https /w valid security cert). If those checks fail, it wont allow you to create the webhook.
11.1 was our initial webhook release and we've fixed a few bugs since then. I'm not aware of any specific bugs in this area that might be causing this. I've created and seen others sending webhook payloads to GP Services; specifically async.
Fascinating... thank you! I'll keep testing and see if I can pinpoint the issue to this environment. If so, we may push this until we can get on a newer LTS release (11.3, likely).
Glad to know it's possible! Thanks @KevinHibma
Update: We upgraded our ArcGIS Enterprise installation to 11.3, RabbitMQ has started correctly and now the feature service web hooks work!