Skip to content

Edit (Feature Service)

URL:
https://<webhooks-url>/<webhookID>/edit
Methods:
POST
Version Introduced:
June, 2020

Description

The owner or admin of a feature service can edit existing webhook configuration parameter.

Request parameters

ParameterDetails
name (Required)

Specifies the webhook's name.

Syntax: String

changeTypes ("Events")

Defines the events that will trigger the webhook. The default is ["*"] if no value is specified. For more information on the values listed below, see the Trigger event values section below.

Values: * | FeaturesCreated | FeaturesUpdated | FeaturesDeleted | FeaturesEdited | AttachmentsCreated | AttachmentsUpdated | AttachmentsDeleted | LayerSchemaChanged | LayerDefinitionChanged | FeatureServiceDefinitionChanged

signatureKey (Optional)

If specified, the secret key will be used in generating the HMAC hex digest of value using sha256 hash function and is return in the x-esriHook-Signature header.

Syntax: String

Use dark colors for code blocksCopy
1
x-esriHook-Signature="sha256=x0mYd8goestNaiaMleQQseoJJelseim9BRse2lgisekvis"
hookUrl Url (Required)

Identifies the payload URL.

Syntax: String

Use dark colors for code blocksCopy
1
"https://webhookURL"
active (Optional)

Enable or disable call backs when the webhook is triggered. The default is false .

Values: true | false

contentType

The Content Type is used to indicate the media type of the resource. The media type is a string sent along with the file indicating the format of the file.

Values: application/json | application/x-www-form-urlencoded

scheduleInfo (Optional)

Sets the schedule properties of a webhook.

Syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "name":"<webhook name>",
  "startAt":"<integer, Unix epoch time>",
  "state":"<enabled | disabled>",
  "recurrenceInfo": {
    "frequency":"<"second","minute","hour","day","week","month","year">
    "interval":<integer>
  }
}

Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "name":"Every-30seconds",
  "startAt":"1478280677536", //Integer
  "state":"enabled",
  "recurrenceInfo": {
    "frequency":"second",
    "interval":30
  }
}
payloadFormat

The response pay load format. The default format is json .

Values: json | pjson

f

The response format. The default format is html .

Values: html | json | pjson

Trigger event values

Below are the accepted values, and descriptions, for the changeTypes parameter:

ValuesDescription
*Wildcard event. Any time any event is triggered.
FeaturesCreatedA new feature is created.
FeaturesUpdatedA feature is updated.
FeaturesDeletedA feature is deleted.
FeaturesEditedA feature is edited (insert or update or delete)
AttachmentsCreatedA new attachment is added to a feature.
AttachmentsUpdatedA feature attachment is updated.
AttachmentsDeletedA feature attachment is deleted.
LayerSchemaChangedA schema is changed in a layer.
LayerDefinitionChangedA layer definition is changed.
FeatureServiceDefinitionChangedA feature service is changed.

Example usage

Below is a sample request URL for edit :

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

Example 1: Here's how you can edit a webhook that posts payloads in JSON format:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "active": true,
  "changeTypes": [
    "FeaturesCreated"
  ],
  "hookUrl": "http://webhookUrl/webhook"
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
  "id": 1,
  "url": "https://gisserver.example.com/<context>/ArcGIS/rest/admin/services/states/FeatureServer/WebHooks/1",
  "name": "myHook",
  "changeTypes": [
    "FeatureCreated"
  ],
  "active": true,
  "hookUrl": "https://webhookUrl/webhook",
  "createdTime": "1526405454399",
  "lastUpdatedTime": "1526405454399"
}

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