Add new item using REST

I want to use REST to create new Item on openHAB. i used openhab 1.8.2 and i find that we can use REST link : curl -X PUT --header “Content-Type: application/json” --header “Accept: application/json” -d "test
" “http://localhost:8080/rest/items/test
and i recieved nothing when i run this command on my linux terminal. Please show me the method use REST to create new item. THanks.

You cannot create a new Item through the REST API in OH 1.8.x

HABMIN can add new item in webpage, how they can do that? Can i use HTML or Javascript to add a new item. My application require to add new item on the web. Thanks.

Habmin edits the .items file.

Is it possible in OH2 Rest API?

See the REST API documentation. I think it is possible. You can install the REST API docs through PaperUI under the Misc tab.

Found this. But it doesn’t work like it should.

An Example i’ve tried you can found here.

At least in my OpenHab 2.5.0 setup rest docs were not under “Misc”, but under “User interfaces”. I know this is an old thread, but it might be useful for someone.