Restful - set value via http link...not working anymore

i used to set values in OH1.83 long time ago via http link (restful). did switch to MQTT and never had a usecase anymore. Now i tried again with 2.3dev but seems to not work as before (i know the link changed…but still. tried several variants…). Can anyone tell me what I do wrong…RestAPI “modul” is installed. (also tried “22”).


message “HTTP 404 Not Found”
http-code 404
class “”
message “HTTP 404 Not Found”
localized-message “HTTP 404 Not Found”

If you have the ClassicUI installed, the CMD servlet is still available in OH2…

This is different than the REST API. If you have the REST API documentation installed, you can access it through the dashboard, or directly at

If you want to use the REST API, the command (i.e. 22) needs to be the payload to a POST method.

Using curl, it would be something like this.

curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "22" ""

hm, thanks - you’re right …CMD still works fine. Did not even try as i generally mixed up Restful and http.
curl works - but (i know boarder to what people here may be able to answer) any ideas what this ESP8266 library may need to get in terms of command?

My assumption is that I need POST not PUT.
so looking and the library doc:

post(const char* path, const char* body)
post(const char* path, String* response)
post(const char* path, const char* body, String* response)

String response = "";
int statusCode ="/", &response);
statusCode ="/", "foo=bar");
response = "";
statusCode ="/", "foo=bar", &response);

Which ment for me:

int statusCode ="/rest/items/SmartDisplay01vcc", "55");

(as I ignore the response, maybe a mistake - also btw GET works fine…so i guess the overall setup is fine like wifi link and ip adress+port)

Would be great if someone could has experience and some ideas what else could be wrong on my side.

Thanks a lot,

Just fixed my problem, in case someone else runs into this issue. I used the GET procedure with ESP and restclient library long time and worked like a charm. Now wanted to also POST item values from ESP to Openhab which did not work out as expected.

What helped, was to add the content-type setting (client.setContentType(“text/plain”);). This was not required for GET, but for POST@Openhab this was required. Now all works fine.