0

Is it possible to automatically invoke an HTTP request when features are created/updated/deleted in an AGOL feature layer?

For example, when a feature is updated, generate an HTTP request with these parameters:

  • edit_type: update
  • objectid: 1
  • asset_id: 10
  • x: 1234.5678
  • y: 8765.4321
  • editdate: 2020-08-04

The HTTP request would be automatically invoked when a feature is edited.

In my case, the HTTP request will create a record in an external system (via POST).

1 Answer 1

1

If the edits are coming from Survey123 you can use Survey123's webhook functionality to do this. If not, you're going to have to look at workarounds in the short term. There was an article from ESRI on the ArcGIS Blog about webhooks getting added to the hosted feature services to do this sort of work (published ~Jul 1, 2020) - but it has since disappeared from the internet.

ESRI Community Article

To get to the rest admin endpoint:

  1. Go to your editing enabled feature service in AGOL

    • Turn on "Keep track of created and updated features". This enables change tracking.

    • enter image description here

  2. On the right of the overview page, open the rest endpoint

    • enter image description here
  3. Modify the url to point to 'rest/admin/services/' instead of 'rest/services/'

  4. Note the new webhooks option in the available endpoints enter image description here

6
  • 1
    I am really bummed that article has gone missing. It looked really useful from the quick skim I had. I assume they are working through teething issues and it will be back eventually... I added the related community link where ESRI said they released the functionality to the answer. Aug 5, 2020 at 3:14
  • 1
    Easy done - hard to explain without pictures. Will edit the answer. :) Aug 5, 2020 at 4:19
  • 1
    And that is the problem with brand new functionality. I haven't seen any docs other than that missing blog article. The hook URL is obviously where you want the data sent, and I have seen 'ALL'as a valid change type. Beyond that you will have to experiment. Aug 5, 2020 at 9:23
  • 1
    @User1973 'endpoint' in this sense has nothing to do with the beginning or end of your process. It is simply a well defined http url that can be utilised to pass messages to ArcGIS server. In this case, you're looking at passing a message to create a webhook. The server will then know where you want information sent when certain changes happen. Make sense? Aug 11, 2020 at 21:30
  • 1
    FYI - A new article posted today: Create a hosted feature service webhook
    – User1974
    Aug 28, 2020 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.