Skip To Content
ArcGIS Developer
Dashboard

Edit (Feature Service)

  • URL:https://<webhooks-url>/<webhookID>/edit(POST only)
  • 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

x-esriHook-Signature="sha256=x0mYd8goestNaiaMleQQseoJJelseim9BRse2lgisekvis"
hookUrlUrl

(Required)

Identifies the payload URL.

Syntax: String

"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

Note:
Microsoft Power Automate supports application/json

scheduleInfo

(Optional)

Sets the schedule properties of a webhook.

Note:
The interval value minimum is 30 seconds.

Syntax: Object

{
  "name" : "Every-20seconds", 
  "startAt" : 1651189590498, 
  "state" : "enabled", 
  
  "recurrenceInfo" : {
    "frequency" : "second", 
    "interval" : 20
  }
}

"startAt" Syntax: Integer

"frequency" Syntax: String

Values: "second" | "minute" | "hour" | "day" | "week" | "month" | "year"

"interval" Syntax: Integer

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.

FeaturesCreated

A new feature is created.

FeaturesUpdated

A feature is updated.

FeaturesDeleted

A feature is deleted.

FeaturesEdited

A feature is edited (insert or update or delete)

AttachmentsCreated

A new attachment is added to a feature.

AttachmentsUpdated

A feature attachment is updated.

AttachmentsDeleted

A feature attachment is deleted.

LayerSchemaChanged

A schema is changed in a layer.

LayerDefinitionChanged

A layer definition is changed.

FeatureServiceDefinitionChanged

A feature service is changed.

Example usage

Below is a sample request URL for edit:

https://myserver.domain.com/myTenant/ArcGIS/rest/admin/services/states/FeatureServer/WebHooks/1/edit

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

{
  "active": true,
  "changeTypes": [
    "FeaturesCreated"
  ],
  "hookUrl": "http://webhookUrl/webhook"
}

JSON Response example

{
  "id": 1,
  "url": "https://myserver.domain.com/myTenant/ArcGIS/rest/admin/services/states/FeatureServer/WebHooks/1",
  "name": "myHook",
  "changeTypes": [
    "FeatureCreated"
  ],
  "active": true,
  "hookUrl": "https://webhookUrl/webhook",
  "createdTime": "1526405454399",
  "lastUpdatedTime": "1526405454399"
}