Add/remove item to group through REST API fails

OH 2.2.0 snapshot build 1072

I think I have identified a bug, but wanted to bring it to the forum first before submitting an issue. When I try to use the REST API to add or remove an item to a group, I get:

{"error":{"message":"HTTP 405 Method Not Allowed","http-code":405,"exception":{"class":"javax.ws.rs.NotAllowedException","message":"HTTP 405 Method Not Allowed","localized-message":"HTTP 405 Method Not Allowed"}}}

This only occurs for items that were created in an items file. It is successful if the group, item or both are created through PaperUI or REST API. In a rule, GroupItem.addMember and GroupItem.removeMember are successful whereever the item and group are created.

Does anyone know if this a bug, or by design?

1 Like

I’ve been struggling with how to edit items created in Simple Mode or .items -files. I also wanted a nice list of all my items, AND be able to add tags (and groups) to them for Google Home support.

I’ve created a script so you can easily edit your items and then import them to OH again. It also allows for editing of all items in PaperUI or REST regardless how they first got created.

HowTo: Move ALL items to JSON dB for easy editing in PaperUI and tagging for Google Home (and Alexa)