Webhook event handler HTTP request
This topic provides an overview of the properties in a webhook event handler request and displays a sample request.
Webhook event handler common properties
A webhook event handler request payload contains the following properties that identify the webhook item and the event that occurred:
Property |
Value type |
Description |
---|---|---|
|
string |
The event name in XP. |
|
GUID |
The ID of the webhook item that subscribed to the event and was triggered. |
|
string |
The webhook item name. |
Event-specific properties
Each event contains event-specific properties. The following table describes the event-specific properties, with events that share identical properties grouped in the same row:
EventName |
Property |
Value type |
Description |
---|---|---|---|
|
|
Item |
The affected item. |
|
|
Item |
The affected item. |
|
Guid |
The parent ID of the removed item. | |
|
|
Item |
The saved item. |
|
ItemChanges |
Information about the changes made to the item. | |
|
|
Item |
The original item. |
|
Item |
The copy of the original item. | |
|
|
Item |
The moved item. |
|
Guid |
The previous parent of the item. | |
|
|
Item |
The renamed item. |
|
string |
The old name of the item. | |
|
|
Item |
The affected item. |
|
string |
The previous item sort order. | |
|
|
Item |
The affected item. |
|
TemplateChanges |
Information about the changes made to the item's template. | |
|
|
PublisherOptions |
The basic publish information. |
|
|
StatusChanges |
Publish progress information. |
|
|
PublisherOptions |
The basic publish information. |
|
Exception |
Information about the exception that occurred during publish attempt. |
Sample webhook event handler request in JSON format
The following is an example of a webhook event handler request in JSON format, informing that an item was added:
{
"EventName": "item:added",
"Item": {
"Language": "en",
"Version": 1,
"Id": "4c3a401e-8b78-440a-bf88-736a71ce8e5a",
"Name": "New sample item",
"ParentId": "8fb31904-1bbc-463c-821b-c7c1a87bf13e",
"TemplateId": "0133f52d-271f-4217-b1cd-04342e3457eb",
"MasterId": "00000000-0000-0000-0000-000000000000",
"SharedFields": [
{
"Id": "a4f985d9-98b3-4b52-aaaf-4344f6e747c6",
"Value": "{88AD1387-D4DA-489D-BB4B-45540917E7ED}"
}
],
"UnversionedFields": [],
"VersionedFields": [...]
},
"WebhookItemId": "95398c44-f232-41a8-b947-8aefec4ce6eb",
"WebhookItemName": "Sample Webhook Event Handler"
}