Error in REST API

I am in the process of upgrading to openhab 3.0, and I enjoy a lot of improvements.

Today I found something which must be a bug in the REST API.

When searching for a group in openhab2 with:
http://openhab2:8080/rest/items/gTempZone_H_FF_Kitchen

i get the following result - as expected (Link to member points to the member):

{
“members”: [
{
“link”: “http://openhab2:8080/rest/items/Thermostat_Kitchen_Room”,
“state”: “22”,
“stateDescription”: {
“pattern”: “%.1f °C”,
“readOnly”: false,
“options”: []
},
“type”: “Number”,
“name”: “Thermostat_Kitchen_Room”,
“label”: “Set room temp”,
“category”: “heating”,
“tags”: [],
“groupNames”: [“gThermostats”, “gTempZone_H_FF_Kitchen”]
}
],
“link”: “http://openhab2:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “NULL”,
“editable”: false,
“type”: “Group”,
“name”: “gTempZone_H_FF_Kitchen”,
“label”: “Temp zone Kitchen”,
“category”: “colorwheel”,
“tags”: [],
“groupNames”: [“gTempZones”]
}

When doing a similar search in openhab3 with:
http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen

I get this result - which is not as expectet (Member link points to group - not to the member )
{
“members”: [
{
“link”: “http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “16.0 °C”,
“type”: “Number:Temperature”,
“name”: “KitchenThermostate”,
“label”: “Thermostat Kitchen”,
“category”: “”,
“tags”: [],
“groupNames”: [“gTempZone_H_FF_Kitchen”, “gThermostats”]
}
],
“link”: “http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “NULL”,
“editable”: false,
“type”: “Group”,
“name”: “gTempZone_H_FF_Kitchen”,
“label”: “Temp zone Kitchen”,
“category”: “colorwheel”,
“tags”: [],
“groupNames”: [“gTempZones”]
}

It might have more to do with how the Group was created than the API.
How is/was the Group defined? How is/was the members defined?

I suppose the next step is to examine the items JSONDB file directly, I’m not sure how much or little the API adds tothat for a query.

Note this member Item as well, not claiming to be a member. Are there nested Groups in this relationship?

Thanks for your reply. I’m not sure what you would like to se in the JSONDB, but here comes the definition of some items:

gTempZones is defined in a .items file
Group gTempZones “Temp zones”

gTempZone_H_FF_Kitchen is defined in a .items file
Group gTempZone_H_FF_Kitchen “Temp zone Kitchen” (gTempZones)

From JSONDB:

KitchenThermostate”: {
“class”: “org.openhab.core.items.ManagedItemProvider$PersistedItem”,
“value”: {
“groupNames”: [
“gTempZone_H_FF_Kitchen”,
“gThermostats”
],
“itemType”: “Number:Temperature”,
“tags”: ,
“label”: “Thermostat Kitchen”,
“category”: “”
}
},

I would expect that the link present in the item, always would point to the item, independent on other circumstanses like group relations…

I’ve just realised your group has but one member, I misread it.

So would I, we were just looking for something screwy in the JSONDB.

I think you should log this as an issue against core on github.

I have never done that before - do you have a link I can use?
Thanks for your support!

I think it belongs here