Skip To Content
ArcGIS Developer
Dashboard

Web Hooks (Feature Service)

Description

Note:
Only ArcGIS Online hosted feature services offers support for this operation.

A feature service can be configured to send a web request to an external website whenever an event is triggered. The external website can be programmed to do whatever is needed when it receives the request, such as log the event, send an email, or perform a data-related activity. This ability to receive a request saves external sites from having to repeatedly poll and inspect the feature service for changes.

The tool that allows a feature servcie to send a request is referred to as a webhook. Administrators can set up one or more webhooks on a feature service. Each webhook identifies the external URL the request gets sent to, as well as one or more change events that trigger it. A change event can be specific and include when features or attachments are added, updated, or deleted, or when the service or layer definition or schema is changed. Alternatively, a change event can be general and include when features are edited in any way or when any other changes is made to the service.

Note:
To enable webhooks, the feature service Editing and ChangeTracking capability must be enabled to track layer changes. A maximum of 5 webhooks can be created for a feature service.

Request parameters

PropertyDetails
f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

Below is a sample request URL used to access the Webhooks resource:

https://myserver.domain.com/myTenant/ArcGIS/rest/admin/services/states/FeatureServer/WebHooks?f=json

JSON Response example

[
  {
    "name": "WebHooks", 
    "owner": "eddie", 
    "id": 9, 
    "globalId": "c740ae24-92a1-4fd2-9a3b-53219bd221e9", 
    "tenantId": 01, 
    "serviceId": 560100, 
    "active": true, 
    "hookUrl": "https://webhookURL", 
    "serviceUrl": "https://myserver.domain.com/tenantID/ArcGIS/rest/services/WebHooks/FeatureServer", 
    "signatureKey": "", 
    "format": "json", 
    "serverGen": 8104206, 
    "createdTime": 1589773034742, 
    "lastUpdatedTime": 1589773034742, 
    "changeTypes": [
      "All"
    ], 
    "scheduleInfo": {
      "name": "Every-20seconds", 
      "state": "enabled", 
      "recurrenceInfo": {
        "frequency": "second", 
        "interval": 20
      }
    }
  }, 
  {
    "name": "WebHooks2", 
    "owner": "eddie", 
    "id": 10, 
    "globalId": "6e2705e5-55fe-4bb6-82d5-3ceis83lb95f", 
    "tenantId": 01, 
    "serviceId": 560100, 
    "active": false, 
    "hookUrl": "https://webhookURL", 
    "serviceUrl": "https://myserver.domain.com/tenantID/ArcGIS/rest/services/WebHooks/FeatureServer", 
    "signatureKey": "", 
    "format": "json", 
    "serverGen": 8118854, 
    "createdTime": 1589836353855, 
    "lastUpdatedTime": 1589836636586, 
    "changeTypes": [
      "All"
    ], 
    "scheduleInfo": {
      "name": "Every-30seconds", 
      "state": "enabled", 
      "recurrenceInfo": {
        "frequency": "second", 
        "interval": 30
      }
    }
  }
]