New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE

Query Tree Item Roots (Tip)

Query Tree Item Roots (Tip)

Returns all the property values of the roots of items in the specified view, in a chosen project
this query returns root items in any folder in a view
root tree items are items which have no parent items. (they may or may not have child tree items) 
The view's root folder is a special case of a folder tree root. 
It is the only folder which has no parent. If the query is run for the folder type, it returns an array of 1, the root folder
All branchable items are roots. They have no children and no parents.
For branchable items, change packages, and traces, this query returns all the viewmembers in the view fully populated

In general, this query is most useful to identify root tree items, i.e. tree items which have no parent tree items,
but it is guaranteed not to fail for other types

 @Param projectid the integer id of the chosen project
 @Param viewid the integer id of a view of the project
 @Param typeid the integer id of a viewmember type from the server catalog
 @Param sessionid a valid session for the logged on user running this query
 @Param folderid an optional integer folder id to constrain the results to root items in the specified folder
 @return the property values of the roos

usage example
http://localhost:8080/MicroFocusHubRESTService/rest/viewmembers/roots/projectid=0/viewid=1/typeid=2/;sessionid=7c5ceef9-7c79-4b8f-83ba-cb6e082ddd1d

Labels (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
2 of 2
Last update:
‎2020-03-11 19:36
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.