Skip to content

Web Hooks (Feature Service)

URL:
https://<FeatureServer-url>/WebHooks
Methods:
POST
Version Introduced:
June, 2020

Description

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.

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:

Use dark colors for code blocksCopy
1
https://gisserver.example.com/<context>/rest/admin/services/states/FeatureServer/WebHooks?f=json

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[
  {
    "name": "WebHooks",
    "owner": "eddie",
    "id": 9,
    "globalId": "c740ae24-92a1-4fd2-9a3b-53219bd221e9",
    "tenantId": 01,
    "serviceId": 560100,
    "active": true,
    "hookUrl": "https://webhookURL",
    "serviceUrl": "https://gisserver.example.com/<context>/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://gisserver.example.com/<context>/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
      }
    }
  }
]

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.