REST API not running

I’ve installed the openhab2 distro (beta2 and latest nightly snapshot). The REST API doesn’t appear to be running. I see no evidence of it being started in the log file. And, I get a 404 Not Found when I go to http://localhost:8080/things.

I’ve tried it on two identical hardware boxes, one running on Ubuntu 15.10 and the other on 16.04.

Is there a binding that is needed to enable the REST API? Or, is there something that needs to be configured?

I concur. If you try to go to the rest interface from the main start page, you get this:

{“schemaValidationMessages”: [
{“level”: “error”,“message”: “Can’t read from file /rest/swagger.json”}]}

From what I’ve been able to see, the main page takes you to this URL, which does not work.
http://localhost:8080/things

But, in my case, this URL actually works (i.e. gives the full list of things).
http://localhost:8080/rest/things

I last updated on 11/5 and can confirm that the REST API is running OK with that build.

From the home page for OH2, if you click on REST API, it takes you to the landing page that looks almost correct. This page is /doc/index.html. At the bottom of this page, there is an error box that if you click on it, you get the message I previously posted.

I agree with you @mhilbush, if you go directly to the URLs that should work, they do work. All of the doc pages seem to be missing rest in the url string perhaps from that initial error of [quote=“xsnrg, post:2, topic:10618”]
Can’t read from file /rest/swagger.json
[/quote]

I will see if there is a ticket for this, and if not, open one.

update: I did not see an issue, so I opened one.

1 Like

Update: Looks like this is fixed by https://github.com/eclipse/smarthome/pull/1504 and just waiting to get pulled into the OH2 build.

UPDATE: build verified, this problem is gone in the latest OH2 nightly.