Skip to content

Item REST endpoint include item parents - #4861

Merged
kaikreuzer merged 3 commits into
openhab:mainfrom
mherwege:rest_item_parents
Jul 12, 2025
Merged

Item REST endpoint include item parents#4861
kaikreuzer merged 3 commits into
openhab:mainfrom
mherwege:rest_item_parents

Conversation

@mherwege

Copy link
Copy Markdown
Contributor

I UI PR to be able to show the semantic tree of an item in the item detail screen.

For this, the item semantic model needs to be requested from the REST API. The current approach is to request the static data for all items, but this may lead to high volumes of data repeatedly being passed over the network (the caching does not always work when proxies are involved).
As the idea is to show a tree only involving the item with its parents (recursive) and children recursive), I have extended the item REST endpoint with a parents parameter (members are already retrieved recursively). This way the semantic model for a single item can be retrieved with the minimum amount of traffic.

Relates to openhab/openhab-webui#3227

@ghys FYI

@kaikreuzer kaikreuzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kaikreuzer

Copy link
Copy Markdown
Member

@mherwege Could you please rebase and resolve the merge conflict here? Thanks!

@mherwege

Copy link
Copy Markdown
Contributor Author

@mherwege Could you please rebase and resolve the merge conflict here? Thanks!

Sorry, @kaikreuzer , I have no access to a computer the next few weeks and will probably not be able to rebase.

@kaikreuzer

Copy link
Copy Markdown
Member

@mherwege No worries, I've done the rebase for you.

mherwege added 3 commits July 12, 2025 23:19
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@kaikreuzer
kaikreuzer merged commit 69bb634 into openhab:main Jul 12, 2025
4 checks passed
@kaikreuzer kaikreuzer added the enhancement An enhancement or new feature of the Core label Jul 12, 2025
@kaikreuzer kaikreuzer added this to the 5.0 milestone Jul 12, 2025
@mherwege
mherwege deleted the rest_item_parents branch July 13, 2025 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature of the Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants