getMatchingNodes
Return nodes that match a set of criteria.
Signature
Section titled “Signature”getMatchingNodes(criteria, match_all=True, exact=False, output="json")
criteria(dict)match_all(bool, default: True)exact(bool, default: False)output(str):json(default),df,raw
Inputs
Section titled “Inputs”criteria: Key/value matches; use@labelsor@idsfor special matching.match_all: Use AND matching when true, OR when false.exact: Use exact string matches instead of partial matches.output: Output format selector.
Examples
Section titled “Examples”Match by code (partial match)
Section titled “Match by code (partial match)”nodes = model.getMatchingNodes({"code": "System_"})Response (json):
[ { "code": "System_01", "name": "System 01" }, { "code": "System_02", "name": "System 02" }]Match by labels
Section titled “Match by labels”nodes = model.getMatchingNodes({"@labels": ["AssetObject", "Equipment"]})Match by multiple fields and exact values
Section titled “Match by multiple fields and exact values”nodes = model.getMatchingNodes( {"code": "System_01", "status": "Active"}, match_all=True, exact=True, output="df",)