Skip To Content

/[webhookID]/update: Update Webhook

  • URL:https://[root]/portals/[portalID]/webhooks/[webhookID]/update
  • Version Introduced:10.7

Example usage

The following is a sample ArcGIS Enterprise POST request for the update operation:


POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/webhooks/ef98412f3555432aa42d3aecc81c633a/update HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

name=Microsoft Flow&url=https://app.logic.azure.com:443/workflows/b688528a36e246279dc050f936e5ebd4/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=nHP-LBo9x-nSgMi11DSDuwRIUiJr-8yKGCy7OYaT_ow&secret=12345ABCDE&config={"deactivationPolicy":{"numberOfFailures": 5,"daysInPast": 5}}&events=/items,/users&f=pjson

Description

The update operation allows administrators to update any previously configured parameters for an organization webhook.

Note:

ArcGIS Enterprise supports organization, feature service, and geoprocessing webhooks. The ArcGIS Portal Directory allows for the creation and management of organization webhooks, and the ArcGIS Server Administrative API Directory supports the creation and management of geoprocessing and feature service webhooks. For information on how to configure service webhooks in ArcGIS Enterprise, see either the ArcGIS Server Admin API webhook documentation or the Manage webhooks in ArcGIS Enterprise administrative documentation. ArcGIS Online supports feature service webhooks, which are managed in the ArcGIS Online Administrative Services Directory. To learn more about ArcGIS Online feature service webhooks, see the Web Hooks API documentation.

Request parameters

ParameterDetails
name

(Required)

The name of the webhook.

Example

name=Microsoft Flow
url

(Required)

The payload URL.

Note:

The payload URL is not required when configuring a webhook for notebooks, as it is automatically derived by the system.

Example

url=https://app.logic.azure.com:443/workflows/b688528a36e246279dc050f936e5ebd4/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=nHP-LBo9x-nSgMi11DSDuwRIUiJr-8yKGCy7OYaT_ow
secret

(Optional)

A user-defined element that can be added to the payload to help authenticate the message on your receiver.

Example

secret=12345ABCDE
config

(Optional)

The configuration properties for the webhook.

Example without properties

config={
 "deactivationPolicy":{"numberOfFailures": 5,"daysInPast": 5}}

Notebook example with properties

config={
 "deactivationPolicy":{"numberOfFailures": 5,"daysInPast": 5},
 "properties": {
  "federatedServer": {
			"itemId": "<Notebook item id to be processed>",
			"tokenTypeToSend": "owner",
			"tokenExpirationTimeMinutes": 10}}}
events

(Required)

The URI representation of an event that will trigger the webhook. For more information, see the Supported trigger events section below.

Example

events=/items,/users
f

The response format. The default format is html.

Values: html | json | pjson

Supported trigger events

You can use the events parameter to manually define the events that will trigger the webhook. Trigger events are divided into the following categories:

Items

The item properties that can be updated vary between item types, and there are unique actions that trigger the update operation. For example, if the item is a web map, updating the tag, configuring a pop-up, or changing the basemap are all update events that will trigger the webhook.

The following table lists the event triggers for an organization's items, which include web maps, web apps, layers, packages, and PDFs:

Event triggerURI

All trigger events for all items

/items

An item is added to the portal

/items/add

Any item is deleted

/items/delete

Any item is updated

/items/update

Any item is moved or its ownership is changed

/items/move

Any item is published

/items/publish

Any item is shared

/items/share

Any item is unshared

/items/unshare

The ownership of any item is reassigned

/items/reassign

A comment is added to any item

/items/addComment

A comment is deleted from any item

/items/deleteComment

A comment is updated on any item

/items/updateComment

All trigger events for a specific item

/items/<itemID>

A specific item is deleted

/items/<itemID>/delete

A specific item's properties are updated

Note:

The item properties that can be updated vary between item types, and there are unique actions that trigger the update operation. For example, if the item is a web map, updating the tag, configuring a pop-up, or changing the basemap are all update events that trigger the webhook.

/items/<itemID>/update

A specific item's ownership is changed or the item is moved

/items/<itemID>/move

A specific item is published

/items/<itemID>/publish

A specific item is shared

/items/<itemID>/share

A specific item is unshared

/items/<itemID>/unshare

The ownership of a specific item is reassigned

/items/<itemID>/reassign

A comment is added to a specific item

/items/<itemId>/addComment

A comment is deleted from a specific item

/items/<itemId>/deleteComment

A comment is updated on a specific item

/items/<itemId>/updateComment

Item event trigger properties

Some of the event triggers for organization items return additional properties in their payloads. The sections below outline the additional payload properties for these triggers.

A specific item is shared

Webhooks that subscribe to the /items/<itemID>/share event trigger have the sharedToGroups property included in their payload. The sharedToGroups property specifies how an item was shared. If the item was shared with a group, the properties JSON object includes the ID for each group the item was shared with. If the item was shared with the organization as a whole, the object includes Organization. If the item was shared publicly, the object includes Everyone. The example below demonstrates sharing an item to specific groups, as well as sharing an item both publicly and to specific groups.

Examples


//groupIDs
"properties": {
  "sharedToGroups": [
    "ecd6646698b24180904e4888d5eaede3",
    "2dff15c514ad4f04b291e304e24a524b"
  ]
}

//Everyone and groupIDs
"properties": {
  "sharedToGroups": [
    "Everyone",
    "4adc30bb03054812a846fa592de105de",
    "a4e6e37e2f7d4bb5b64d587c91d39a2c"
  ]
}

Ownership of any item is reassigned

Webhooks that subscribe to the /items/reassign event trigger have the reassignedTo property included in their payload. The reassignedTo property specifies the new user an item or group is reassigned to, returning the username of the new owner in the properties JSON object.

Example


"properties": {
  "reassignedTo": ["newOwner"]
}

A specific item is unshared

Webhooks that subscribe to the /items/<itemID>/unshare event trigger have the unsharedFromGroups property included in their payload. The unsharedFromGroups property specifies how an item was unshared. If the item was unshared from a group, the properties JSON object will include the IDs for each group the item was unshared from. If the item was unshared from the organization as a whole, the object includes Organization. If the item was unshared from the public, the object includes Everyone. The example properties below demonstrate unsharing an item from the public and from a specific group.

Examples


//Everyone
"properties": {
  "unsharedFromGroups": ["Everyone"]
}

//groupID
"properties": {
  "unsharedFromGroups": [
    "4adc30bb03054812a846fa592de105de"
  ]
}

Ownership of a specific item is reassigned

Webhooks that subscribe to the /items/<itemID>/reassign event trigger have the reassignedTo property included in their payload. The reassignedTo property specifies the new user an item or group is assigned to, returning the username of the new owner in the properties JSON object.

Example


"properties": {
  "reassignedTo": ["newOwner"]
}

Groups

Any general changes made to the group settings constitute an update. For example, changing a group's access will trigger an update event.

The following table lists the trigger events associated with groups:

Event triggerURI

All trigger events for all groups

/groups

A group is added

/groups/add

Any group is updated

/groups/update

Any group is deleted

/groups/delete

Delete Protection is enabled for any group

/groups/protect

Delete Protection is disabled for any group

/groups/unprotect

A user is invited to any group

/groups/invite

A user is added to any group

/groups/addUsers

A user is removed from any group

/groups/removeUsers

A user's role is updated in any group

/groups/updateUsers

The ownership for any group is reassigned

/groups/reassign

An item is shared to any group

/groups/itemShare

An item is unshared from any group

/groups/itemUnshare

A user submits a request to join any group

/groups/requestJoin

All trigger events for a specific group

/groups/<groupID>

A specific group is updated

Note:

Any general changes made to the group settings constitute an update. For example, changing a group's access will trigger an update event.

/groups/<groupID>/update

A specific group is deleted

/groups/<groupID>/delete

Delete Protection is enabled for a specific group

/groups/<groupID>/protect

Delete Protection is disabled for a specific group

/groups/<groupID>/unprotect

A user is invited to a specific group

/groups/<groupID>/invite

A user is added to a specific group

/groups/<groupID>/addUsers

A user is removed from a specific group

/groups/<groupID>/removeUsers

A user's role is updated in a specific group

/groups/<groupID>/updateUsers

The ownership for a specific group is reassigned

/groups/<groupID>/reassign

An item is shared to a group

/groups/<groupID>/itemShare

An item is unshared from a specific group

/groups/<groupID>/itemUnshare

A user requests to join a specific group

/groups/<groupId>/requestJoin

Group event trigger properties

Some of the event triggers for organization groups return additional properties in the payload. The sections below outline the additional payload properties for these triggers.

A user is invited to a specific group

Webhooks that subscribe to the /groups/<groupID>/invite event trigger have the invitedUserNames property included in their payload. The invitedUserNames property specifies the usernames of users invited to a group, returning a list of usernames in the properties JSON object.

Example


"properties": {
  "invitedUserNames": [
    "u1TestUser",
    "u2TestUser"
  ]
}

A user is added to a specific group

Webhooks that subscribe to the /groups/<groupID>/addUsers event trigger have the addedUserNames property included in their payload. The addedUserNames property specifies the usernames of users added to a group, returning a list of usernames in the properties JSON object.

Example


"properties": {
  "addedUserNames": [
    "u1TestUser",
    "u2TestUser"
  ]
}

A user is removed from a specific group

Webhooks that subscribe to the /groups/<groupID>/removeUsers event trigger have the removedUserNames property included in their payload. The removedUserNames property specifies the usernames of users removed from a group, returning a list of usernames in the properties JSON object.

Example


"properties": {
  "removedUserNames": [
    "u1TestUser",
    "u2TestUser"
  ]
}

A user's role is updated in a specific group

Webhooks that subscribe to the /groups/<groupID>/updateUsers event trigger have the updatedUserNames property included in their payload. The updatedUserNames property specifies the usernames of users whose group roles have been updated, returning a list of usernames in the properties JSON object.

Example


"properties": {
  "updatedUserNames": [
    "u1TestUser",
    "u2TestUser"
  ]
}

An item is shared to a group

Webhooks that subscribe to the /groups/<groupID>/itemShare event trigger have the sharedItems property included in their payload. The sharedItems property specifies the itemID value and item type of the item shared to a group, returning this information in the properties JSON object.

Example


"properties": {
  "sharedItems": [
    {
      "itemId": "6cd80cb32d4a4b4d858a020e57fba7b1",
      "itemType": "Map Package"
    }
  ]
}

An item is unshared from a specific group

Webhooks that subscribe to the /groups/<groupID>/itemUnshare event trigger have the unsharedItems property included in their payload. The unsharedItems property specifies the itemID value and item type of the item unshared from a group, returning this information in the properties JSON object.

Example


"properties": {
  "unsharedItems": [
    {
      "itemId": "7dd95fadaec84859ab8ed1059e675e0c",
      "itemType": "Image"
    }
  ]
}

Users

An update event is triggered any time a change is made to the user's profile. However, changes made to a user's role, user type, or license are not considered an update to the user's profile.

The following table lists the trigger events associated with users:

Event triggerURI

All trigger events for all users in the portal

/users

A user is added to the organization

/users/add

Any user has signed in to the portal

/users/signin

Any user has signed out of the portal

/users/signout

Any user is deleted

/users/delete

Any user's profile is updated

Note:

An update event is triggered any time a change is made to the user's profile. However, changes made to a user's role, user type, or license are not considered an update to the user's profile.

/users/update

Any user's account is disabled

/users/disable

Any user's account is enabled

/users/enable

Any user is assigned a new role

/users/updateUserRole

Any user is assigned a new user type

/users/updateUserLicenseType

A list of user accounts are enabled

/users/bulkEnable

A list of user accounts are disabled

/users/bulkDisable

All trigger events associated with a specific user

/users/<username>

A specified user has signed into the portal

/users/<username>/signIn

A specified user has signed out of the portal

/users/<username>/signOut

A specific user is deleted

/users/<username>/delete

A specific user's profile is updated

Note:

An update event is triggered any time a change is made to the user's profile. However, changes made to a user's role, user type, or license are not considered an update to the user's profile.

/users/<username>/update

A specific user's account is disabled

/users/<username>/disable

A specific user's account is enabled

/users/<username>/enable

A specific user is assigned a new role

/users/<username>/updateUserRole

A specific user is assigned a new user type

/users/<username>/updateUserLicenseType

User event trigger properties

Some of the event triggers for organization users return additional properties in the payload. The sections below outline the additional payload properties for these triggers.

A specific user is assigned a new role

Webhooks that subscribe to the /users/<username>/updateUserRole event trigger have the userRoleUpdatedTo property included in their payload. The userRoleUpdatedTo property specifies the new role the user is assigned, returning the new role in the properties JSON object.


"properties": {
  "userRoleUpdatedTo": ["New role"]
}

A specific user is assigned a new user type

Webhooks that subscribe to the /users/<username>/updateUserLicenseType event trigger have the userLicenseTypeUpdatedTo property included in their payload. The userLicenseTypeUpdatedTo property specifies the new user type that a user is assigned, returning the new user type in the properties JSON object.


"properties": {
  "userLicenseTypeUpdatedTo": ["Editor"]
}

Roles

An update event is trigged any time a change is made to an organization's roles.

The following table lists the trigger events associated with user roles:

Event triggerURI

All trigger events for all roles in the portal

/roles

A new role is created

/roles/add

An existing role is updated

Note:

An update event is trigged any time a change is made to an organization's roles.

/roles/update

An existing role is deleted

/roles/delete

Role event trigger properties

Some of the event triggers for organization roles return additional properties in the payload. The section below outlines the additional payload properties for these triggers.

A new role is created

Webhooks that subscribe to the /roles/add event trigger have the name property included in their payload. The name property specifies the name of the role that was created, returning the role name in the properties JSON object.

Example


"properties": {
  "name": ["New role"]
}

JSON Response example


{
  "success": true
}