- URL:
- https://[root]/portals/[portalID]/webhooks/[webhookID]/update
- Methods:
GET
- 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.
Request parameters
Parameter | Details |
---|---|
(Required) | The name of the webhook. Example
|
(Required) | The payload URL. Example
|
(Optional) | A user-defined element that can be added to the payload to help authenticate the message on your receiver. Example
|
(Optional) | The configuration properties for the webhook. Example
Notebook example with properties
|
(Required) | The URI representation of an event that will trigger the webhook. For more information, see the Supported trigger events section below. Example
|
| The response format. The default format is Values: |
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 your organization's items, which include web maps, web apps, layers, packages, and PDFs:
Event trigger | URI |
---|---|
All trigger events for all items |
|
An item is added to the portal |
|
Any item is deleted |
|
Any item is updated |
|
Any item is moved or its ownership is changed |
|
Any item is published |
|
Any item is shared |
|
Any item is unshared |
|
The ownership of any item is reassigned |
|
A comment is added to any item |
|
A comment is deleted from any item |
|
A comment is updated on any item |
|
All trigger events for a specific item |
|
A specific item is deleted |
|
A specific item's properties are updated |
|
A specific item's ownership is changed or the item is moved |
|
A specific item is published |
|
A specific item is shared |
|
A specific item is unshared |
|
The ownership of a specific item is reassigned |
|
A comment is added to a specific item |
|
A comment is deleted from a specific item |
|
A comment is updated on a specific item |
|
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/
event trigger have the shared
property included in their payload. The shared
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.
//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 reassigned
property included in their payload. The reassigned
property specifies the new user an item or group is reassigned to, returning the username of the new owner in the properties
JSON object.
"properties": {
"reassignedTo": ["newOwner"]
}
A specific item is unshared
Webhooks that subscribe to the /items/
event trigger have the unshared
property included in their payload. The unshared
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, as well as unsharing an item from a specific group.
//Everyone
"properties": {
"unsharedFromGroups": ["Everyone"]
}
//groupID
"properties": {
"unsharedFromGroups": [
"4adc30bb03054812a846fa592de105de"
]
}
Ownership of a specific item is reassigned
Webhooks that subscribe to the /items/
event trigger have the reassigned
property included in their payload. The reassigned
property specifies the new user an item or group is assigned to, returning the username of the new owner in the properties
JSON object.
"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 trigger | URI |
---|---|
All trigger events for all groups |
|
A group is added |
|
Any group is updated |
|
Any group is deleted |
|
Delete Protection is enabled for any group |
|
** Delete Protection** is disabled for any group |
|
A user is invited to any group |
|
A user is added to any group |
|
A user is removed from any group |
|
A user's role is updated in any group |
|
The ownership for any group is reassigned |
|
An item is shared to any group |
|
An item is unshared from any group |
|
A user submits a request to join any group |
|
All trigger events for a specific group |
|
A specific group is updated |
|
A specific group is deleted |
|
Delete Protection is enabled for a specific group |
|
Delete Protection is disabled for a specific group |
|
A user is invited to a specific group |
|
A user is added to a specific group |
|
A user is removed from a specific group |
|
A user's role is updated in a specific group |
|
The ownership for a specific group is reassigned |
|
An item is shared to a group |
|
An item is unshared from a specific group |
|
A user requests to join a specific group |
|
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/
event trigger have the invited
property included in their payload. The invited
property specifies the usernames of users invited to a group, returning a list of usernames in the properties
JSON object.
"properties": {
"invitedUserNames": [
"u1TestUser",
"u2TestUser"
]
}
A user is added to a specific group
Webhooks that subscribe to the /groups/
event trigger have the added
property included in their payload. The added
property specifies the usernames of users who have been added to a group, returning a list of usernames in the properties
JSON object.
"properties": {
"addedUserNames": [
"u1TestUser",
"u2TestUser"
]
}
A user is removed from a specific group
Webhooks that subscribe to the /groups/
have the remove
property included in their payload. The remove
property specifies the usernames of users removed from a group, returning a list of usernames in the properties
JSON object.
"properties": {
"removedUserNames": [
"u1TestUser",
"u2TestUser"
]
}
A user's role is updated in a specific group
Webhooks that subscribe to the /groups/
have the update
property included in their payload. The update
property specifies the usernames of users whose group roles have been updated, returning a list of usernames in the properties
JSON object.
"properties": {
"updatedUserNames": [
"u1TestUser",
"u2TestUser"
]
}
An item is shared to a group
Webhooks that subscribe to the /groups/
have the shared
property included in their payload. The shared
property specifies the item
and item type of the item shared to a group, returning this information in the properties
JSON object.
"properties": {
"sharedItems": [
{
"itemId": "6cd80cb32d4a4b4d858a020e57fba7b1",
"itemType": "Map Package"
}
]
}
An item is unshared from a specific group
Webhooks that subscribe to the /groups/
have the unshared
property included in their payload. The unshared
property specifies the item
and item type of the item unshared from a group, returning this information in the properties
JSON object.
"properties": {
"unsharedItems": [
{
"itemId": "7dd95fadaec84859ab8ed1059e675e0c",
"itemType": "Image"
}
]
}
Users
An update event is triggered anytime 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 trigger | URI |
---|---|
All trigger events for all users in the portal |
|
A user is added to the organization |
|
Any user has signed in to the portal |
|
Any user has signed out of the portal |
|
Any user is deleted |
|
Any user's profile is updated |
|
Any user's account is disabled |
|
Any user's account is enabled |
|
Any user is assigned a new role |
|
Any user is assigned a new user type |
|
A list of user accounts are enabled |
|
A list of user accounts are disabled |
|
All trigger events associated with a specific user |
|
A specified user has signed into the portal |
|
A specified user has signed out of the portal |
|
A specific user is deleted |
|
A specific user's profile is updated |
|
A specific user's account is disabled |
|
A specific user's account is enabled |
|
A specific user is assigned a new role |
|
A specific user is assigned a new user type |
|
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/
have the user
property included in their payload. The user
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/
have the user
property included in their payload. The user
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 anytime a change is made to your organization's roles.
The following table lists the trigger events associated with user roles:
Event trigger | URI |
---|---|
All trigger events for all roles in the portal |
|
A new role is created |
|
An existing role is updated |
|
An existing role is deleted |
|
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.
"properties": {
"name": ["New role"]
}
JSON Response example
{
"success": true
}