DescendantControl is used to request the descendants of an entity.
The DescendantControl data object extends from HierarchyControl. It is used in the input data object of the get API to request descendants of the entity. If DescendantControl is added to the data object in a get operation, the descendants of the entities under Root DataObject are returned in the returning data graph.
Because DescendantControl is extended from SearchControl, you can specify search properties in the DescendantControl to return only the descendants that satisfy the search criteria. For example, you can add property expression with value: entities[@xsi:type='PersonAccount'] to return only the descendants that are persons. DescendantControl can also be used to specify the level and the properties to be returned for the descendants.
DescendantControl level | Description |
---|---|
1 (default) | Returns children only. |
Any positive integer | Returns the specified level of descendants. For example, specifying 2 returns two levels, the children and grandchildren. |
0 | Returns all the descendants. |
<xsd:complexType name="DescendantControl"> <xsd:complexContent> <xsd:extension base="HierarchyControl"> </xsd:extension> </xsd:complexContent> </xsd:complexType>
<wim:controls xsi:type="wim:DescendantControl" level="0"> <wim:properties>uid</wim:properties> <wim:properties>cn</wim:properties> <wim:properties>o</wim:properties> <wim:properties>ou</wim:properties> </wim:controls>