Webhook application/Json data handover

Hi All,

I use OH4.1.2 and I would like to get data into OH, send by an api via a webhook.
I could receive the data, but I have no clue, how I could get this data into openHab and work with this data.

The webhook send its data as POST application/json in following format:

{
  "title": "Titel1",
  "text": "Textmessage",
  "address": "Street, City",
  "priority": true
}

Can someone point me to the right approach to receive the data, probably store it with an item and use later the states out of it. In prinicpal I guess, I could be handled with json transformation - but I have no clue where to start reading.

Thanks for every hint in advance.

You will need to go to the Add-on Store and install the JsonPath transformation. Here are the docs for it:

When you link an item to the channel you have defined in your webhook thing, you will apply this transformation to the link using the profile setting:

Your json is straightforward, so your expression will not be too difficult to work out. For example to get the title you’ll just use $.title. However, if you are unsure, you can always use an online tester such as https://jsonpath.com/ to work out what the path needs to be.

Cool - great explanation. I will give a try in the next days.

Thx