Skip to content

Commit ab26c98

Browse files
jhoward1994pwizla
andauthored
Describe review workflows webhook payload change (#1766)
* feature: 4.11.3-4.11.4 migration guide * chore: cleanup * fix: payload info on webhooks page * Update docusaurus/docs/dev-docs/migration/v4/migration-guide-4.11.3-to-4.11.4.md * Update docusaurus/docs/dev-docs/migration/v4/migration-guide-4.11.3-to-4.11.4.md * Update docusaurus/docs/dev-docs/migration/v4/migration-guide-4.11.3-to-4.11.4.md * fix: remove migration guide and callout payload change in webhooks doc * Update docusaurus/docs/dev-docs/backend-customization/webhooks.md * Update docusaurus/docs/dev-docs/backend-customization/webhooks.md * Update docusaurus/docs/dev-docs/backend-customization/webhooks.md --------- Co-authored-by: Pierre Wizla <[email protected]>
1 parent b36474f commit ab26c98

File tree

2 files changed

+72
-7
lines changed

2 files changed

+72
-7
lines changed

docusaurus/docs/dev-docs/backend-customization/webhooks.md

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,18 +443,81 @@ This event is only available with the <EnterpriseBadge/> edition of Strapi.<br /
443443
```json
444444
{
445445
"event": "review-workflows.updateEntryStage",
446-
"createdAt": "2020-01-10T11:02:46.232Z",
447-
"model": "address",
448-
"uid": "api::address.address",
446+
"createdAt": "2023-06-26T15:46:35.664Z",
447+
"model": "model",
448+
"uid": "uid",
449+
"entity": {
450+
"id": 2
451+
},
452+
"workflow": {
453+
"id": 1,
454+
"stages": {
455+
"from": {
456+
"id": 1,
457+
"name": "Stage 1"
458+
},
459+
"to": {
460+
"id": 2,
461+
"name": "Stage 2"
462+
}
463+
}
464+
}
465+
}
466+
```
467+
468+
:::caution Payload format for Strapi v4.11.4+
469+
The payload format for the `review-workflows.updateEntryStage` webhook changed between Strapi v4.11.3 and Strapi v4.11.4. Please notice the payload format differences in the following examples and update your integration code accordingly:
470+
471+
<details>
472+
<summary>Payload formats for Strapi v4.11.3 vs. Strapi v4.11.4</summary>
473+
474+
In Strapi v4.11.3 the webhook payload has the following structure:
475+
476+
```json
477+
{
478+
"event": "review-workflows.updateEntryStage",
479+
"createdAt": "2023-06-30T11:40:00.658Z",
480+
"model": "model",
481+
"uid": "uid",
449482
"entry": {
450-
"entityId": 1,
483+
"entityId": 2,
451484
"workflow": {
452485
"id": 1,
453486
"stages": {
454-
"from": 2,
455-
"to": 1
487+
"from": 1,
488+
"to": 2
489+
}
490+
}
491+
}
492+
}
493+
```
494+
495+
In Strapi v4.11.4 the webhook payload has the following structure:
496+
497+
```json
498+
{
499+
"event": "review-workflows.updateEntryStage",
500+
"createdAt": "2023-06-26T15:46:35.664Z",
501+
"model": "model",
502+
"uid": "uid",
503+
"entity": {
504+
"id": 2
505+
},
506+
"workflow": {
507+
"id": 1,
508+
"stages": {
509+
"from": {
510+
"id": 1,
511+
"name": "Stage 1"
512+
},
513+
"to": {
514+
"id": 2,
515+
"name": "Stage 2"
456516
}
457517
}
458518
}
459519
}
460520
```
521+
522+
</details>
523+
:::

docusaurus/docs/dev-docs/migration-guides.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ sidebarDepth: 0
88

99
# Migration guides
1010

11-
Migrations are necessary when upgrades to Strapi include breaking changes. The migration guides are sequential, meaning if there is more than 1 migration guide between your current version and the latest release, follow each guide in order. If there is no specific migration guide between your current version and the latest release follow the [Upgrade Strapi guide](/dev-docs/update-version.md).
11+
Migrations are necessary when upgrades to Strapi include breaking changes. The migration guides are sequential, meaning if there is more than 1 migration guide between your current version and the latest release, follow each guide in order.
12+
13+
If there is no specific migration guide between your current version and the latest release, you only need to follow the [guide to upgrade Strapi](/dev-docs/update-version.md).
1214

1315
:::caution
1416
[Plugins extension](/dev-docs/plugins/users-permissions) that create custom code or modify existing code will need to be updated and compared to the changes in the repository. Not updating the plugin extensions could break the application.

0 commit comments

Comments
 (0)