List ancestor nodes
- async AsyncCogniteClient.three_d.revisions.list_ancestor_nodes(
- model_id: int,
- revision_id: int,
- node_id: int | None = None,
- limit: int | None = 25,
-
- Parameters:
model_id (int) – Id of the model.
revision_id (int) – Id of the revision.
node_id (int | None) – ID of the node to get the ancestors of.
limit (int | None) – Maximum number of nodes to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
- Returns:
The list of 3d nodes.
- Return type:
Example
Get a list of ancestor nodes of a given node:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> res = client.three_d.revisions.list_ancestor_nodes( ... model_id=1, revision_id=1, node_id=5, limit=10 ... )