Read/Write System Location using REST on openHAB 3

I have recently upgraded from openHAB 2.5 to 3.0 and a python script I have been using to update the openHAB system location has stopped working. The script executed an http get request to read a json document, updated the location tag within the document and then used an http put to send the updated json document back to openHAB, the URL for both get and put is http://127.0.01:8080/rest/services/org.eclipse.smarthome.i18n/config. This worked perfectly with openHAB 2.5 but with openHAB 3.0 the get request returns an empty json document.
Can anyone suggest a way to accomplish the same with openHAB 3.0 ?

OH3 REST requires authorization for many things, search for other threads about this.

Besides that what @rossko57 mentioned a part of the URL need to be changed.
The new one should be

Returned value would be e.g.:


I did initially have the authentication error but did work out how to create and use an authentication token, the suggested URL works perfectly, thank you :slight_smile:

1 Like