Hi,
I’m running Squidex dev-5061 and I’m trying to run a webhook after a page has been updated, published or any of the other events.
The POST from Squidex works fine. It sends the payload from Squidex to my webhook.
The problem I’m having is that I’m not able to retrieve the value of a variable once inside my webhook - I get a null value.
Payload:
{
"type": "ReviewUpdated",
"payload": {
"$type": "EnrichedContentEvent",
"type": "Updated",
"id": "775e3977-41ae-47be-8ff5-be74a215eddc",
"created": "2020-10-21T13:11:25Z",
"lastModified": "2020-10-21T14:24:37Z",
"createdBy": "client:dev-my-app:reviewswrite",
"lastModifiedBy": "subject:5bacceac5935680001f6cba6",
"data": {
"myobjectid": {
"en-US": [
"84c9aabd4-1232-470c-8d55-775740dc7666"
],
"sv-SE": []
}
},
"dataOld": {
"myobjectid": {
"en-US": [
"84c9aabd4-1232-470c-8d55-775740dc7666"
],
"sv-SE": []
}
},
"status": "Published",
"partition": -1732732684,
"schemaId": "8ce4b60e-9211-4f8d-9432-6df2eb80c3c4,review",
"actor": "subject:5bmcce9c5935680001f6cba6",
"appId": "1b1836f6-221e-4e1e-8059-3aa3eec5154e,dev-db",
"timestamp": "2020-10-21T14:24:37Z",
"name": "ReviewUpdated",
"version": 11
},
"timestamp": "2020-10-21T14:24:37Z"
}
This is the webhook URI:
http://some.domain/webhook?schemaName=$SCHEMA_NAME&contentAction=$CONTENT_ACTION&objIdEnUs=$CONTENT_DATA.myobjectid.en-US&objIdSvSe=$CONTENT_DATA.myobjectid.sv-SE
C# webhook signature:
public async Task OnPostAsync(string schemaName, string contentAction, string objIdEnUs, string objIdSvSe)
{
...
}
I’ve tried the following syntax:
$CONTENT_DATA.myobjectid.en-US
$CONTENT_DATA.myobjectid.en_US
$CONTENT_DATA.myobjectid.en-us
$CONTENT_DATA.myobjectid.en_us
In the docs there’s nothing about localized $CONTENT_DATA syntax.
I checked https://github.com/Squidex/squidex/blob/master/backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/RuleEventFormatterTests.cs
but there’s no localized examples there either.
How do I construct my localized webhook URI?
Thanks!