[SOLVED] How to create own rest endpoint

Is it possible to create new rest end-point in openhab?

I believe most (all) items etc are accessible over rest

What do you want to accomplish? Access the value of an item (then, use the already existing REST API) or do you want to expose your own service?

Yes it is. Look at the automation module rest bundle for example. That bundle is relatively new to the core and should show best practices. It is basically three lines or so to register your endpoint.

Cheers, David

I want openhab to be first layer to access by app “as i want to create my own mobile app” via rest api since openhab has capability to exposed in local or internet with openhab cloud. I want to integrate 3rd party app and access over openhab through rest api.

Your question is so vague. What are you trying to accomplish and why would OH’s own REST API not work?

I want to define my own Rest endpoint so I can integrate 3rd party app. For me, I find it easy to integrate app using webservice.

anyway I made it working now thanks David_Graeff for giving me a clue.

1 Like