AncestorControl is used to request the ancestors of an entity.
The AncestorControl data object extends from HierarchyControl. It is used in the input data object of the get API to request the ancestors of an entity. If AncestorControl is added to the data object in a get operation, the ancestors of the entities under Root DataObject are returned in the returning data object.
Because AncestorControl is extended from SearchControl, you can specify search properties in the AncestorControl to return only the ancestors that satisfy the search criteria. AncestorControl can also be used to specify the level and the properties to be returned for the ancestors.
AncestorControl level | Description |
---|---|
1 (default) | Returns parent only. |
Any positive integer | Returns the specified level of ancestors. For example, specifying 2 returns two levels, the parent and grandparent. |
0 | Returns all the ancestors up to the virtual member manager node. |
<xsd:complexType name="AncestorControl"> <xsd:complexContent> <xsd:extension base="HierarchyControl"> </xsd:extension> </xsd:complexContent> </xsd:complexType>
<wim:controls xsi:type="wim:AncestorControl" level="0"> <wim:properties>uid</wim:properties> <wim:properties>cn</wim:properties> <wim:properties>o</wim:properties> <wim:properties>ou</wim:properties> </wim:controls>