You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 16/umbraco-cms/reference/webhooks/README.md
+36-17Lines changed: 36 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,31 +52,50 @@ Umbraco webhooks come with predefined settings and behaviors.
52
52
53
53
### JSON Payload
54
54
55
-
Each webhook event sends a JSON payload. For example, the `Content Published` event includes full content details:
55
+
Each webhook event sends a JSON payload. The following types of payloads are available by default
56
56
57
-
```json
57
+
- Legacy: This is the current default but will be removed in a future version. It uses the payloads as they were before V16. These payloads are inconsistent and contain information that was never ment to be exposed or is superseded by newer types (int vs guid).
58
+
- Minimal: This will be the default in v17+. This version of the payloads will only contain information to indentify the resource in question. For most resources this will be it's unique identifier. Some events might require more information. For example: the payload for the document publish event will also contain all cultures that were published at that point in time.
59
+
- Extended: These are new payload types that are available for some but not all events that gives you all relevant information regarding the event. Some information, like user/member names and emails, are not part of the payloads for security/privacy concerns. In cases where an extended payload is not present for an event, the minimal will be used as fallback.
60
+
61
+
You can change which payload type is used by
62
+
63
+
- Changing the appsetting `Umbraco:CMS:Webhook:PayloadType`. Be aware that the system that uses this value is run before any composers. If you manipulate the `WebhookEventCollectionBuilder` in anyway then those methods will not automatically pick up this appsetting.
64
+
- Passing in the PayloadType into the `WebhookEventCollectionBuilderExtensions` methods to control which webhook events are added
65
+
66
+
```csharp
67
+
usingUmbraco.Cms.Core.Composing;
68
+
usingUmbraco.Cms.Core.Webhooks;
69
+
70
+
namespaceUmbraco.Cms.Web.UI.Composers;
71
+
72
+
// this composer clears all registered webhooks and then adds all (umbraco provided) webhooks with their extended payloads
0 commit comments