Item REST endpoint include item parents - #4861
Merged
Merged
Conversation
Member
|
@mherwege Could you please rebase and resolve the merge conflict here? Thanks! |
Contributor
Author
Sorry, @kaikreuzer , I have no access to a computer the next few weeks and will probably not be able to rebase. |
Member
|
@mherwege No worries, I've done the rebase for you. |
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
force-pushed
the
rest_item_parents
branch
from
July 12, 2025 21:25
65fb719 to
1f020dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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