[RestAPI] How to use actions


I am trying to access and execute available actions through the RestAPI.
Unfortunately there seems to be no endpoint which exposes the registered actions.
Am I missing something?

Also under the VOICE endpoint there is no way to trigger a SAY command.
Was this forgotten or is this intentional?


I suspect the two are related as the SAY command is an Action. Until very recently, Actions were still OH 1.x and maintained in the openhab1-addons repo. A lot of work needs to be made, including creating REST endpoints, for them and other parts of OH (e.g. Persistence configuration).

There is also a new way to do Actions for 2.x bindings where the Actions are now a part of the bindings (see MQTT 2) and to use them in Rules they have to be imported. See https://www.openhab.org/addons/bindings/mqtt.generic/#rule-actions. I’d not be surprised if there is no REST end point for these either.

While I know why you want these end points, I doubt that Actions as a concept have ever been considered to be used from anywhere but the Rules engines built into OH.

Exactly - or at least that was my impression.

Thank you for your quick reply - I have created two issues to track this since I believe this should be part of the Rest API provided by the core.

Were these issues ever solved?
Also looking for ways to call actions via rest api.

Here is the issue in case anyone is looking for it. https://github.com/openhab/openhab-core/issues/926

No - I use items mapped to channels instead of actions or use corresponding python libraries instead of bindings.