Issue with the REST API - UID must have at least 3 segments

So I am trying to use the REST API to add a Z-Stick, by Creating a new thing and adding it to the registry.

My Curl has the UID as “UID”: “zwave:serial_zstick:name”, which is 3 segments.
however, when I attempt to add a new device is returns an error message saying UID must have at least 3 segments
“class”: “java.lang.IllegalArgumentException”,
“message”: “UID must have at least 3 segments.”,
“http-code”: 500,

I believe it is strongly recommended by @Chris that all Z-Wave & Zigbee things be created through the HABmin interface discovery process,

what if it is not an option?

Have you looked at the REST API and tried options like this?

I have not tried that…

I have tried that, it says the same error, when I try to add a zwave thing I have no issue, my issue is only with the USB zstick

HABmin and PaperUI both use the REST interface, so if the error occurs on one, it will likely occur on both, and alos by using the REST interface directly.

1 Like

What REST API functions are called?
I did not realize HABmin used the REST API

Lots of them - far too many to list.

It’s the only API available for browsers etc to interface to openHAB for configuration etc. Everything HABmin and PaperUI do is done through the REST API.

1 Like

It would be helpful if you would post your actual curl command.

If I had to do this, I’d first add the device through one of the existing UIs and watch what calls are made with the debugging tools in the browser. You should be able to reproduce those calls in your application.

1 Like

I actually was able to make it work successfully, the problem was something else and not the UID, the error message wasn’t display the right error I guess. I will share the codes for you to review once I have access to my laptop