Openhab REST API Json


I need to send/receive JSON command through the rest api

I use the Advanced REST client, a google chrome addon, to test my commands

I can send/receive the state on the item with PUT / GET

If I open this link:

I get this JSON:


Can I use this to send/receive JSON code to the item Light_FF_Bath_Mirror, and send it to ?

I would advise to not make it more complicate as it is. openhab uses swagger, one of the best REST API documentation and testing tool which exists IMO.

to access it, you can open https://openhab:8443/doc/index.html
there you can read how to webservice works, what methods you need to send, and the commands. mostly for sending simple commands you send it as text/plain instead of json.

I don’t know, can you?
Have you tried it? You’ll get your answer…

1 Like

I can not fugue out how to send it, so I don’t know if it works.

I have tried the link, but doesn’t help me, how I can send plain/text to the IP address with out /something/something

first you need to decide to a technology… javascript ajax request, with any server side scripting language or higher programing language making http post/get/… requests.

when you decided what you want to use, you will become help for sure