How to setup REST

I would like to communicate with another programm. So I would like to create my own REST Paths and GET/PUT/POST/DELETE methods.

  1. Therefore, is it possibly to use the already running REST server? Then I would create a new Path and so on…
  2. Furthermore, is the REST implementation of openHAB just for the communication with the ui?
  3. Is there something like a “main” method in a binding?

Please give me an answer, or at least a link to more informations about this topic!

Solved

Well, it is mainly designed for the UIs, but it also serves as an integration possibility with other systems. But note that it is NOT expected to be extended by bindings. External system should better either use the existing REST resources or better not do calls to openHAB at all, but rather only do callbacks through openHAB-initiated channels, like UPnP GENA events, websockets etc.

So if you really need to extend the REST API, be aware that this is something very proprietary for your own purposes then.