find_paths
Find shortest paths between two nodes in an infrastructure graph. Specify source and destination to discover how objects are connected.
Instructions
Find the shortest path(s) between two nodes in the Infrahub graph.
Use this to answer "how are these two objects connected?". A result with
count of 0 means no path exists within max_depth. Requires Infrahub 1.10+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Branch to query. Defaults to the default branch. | |
| source | Yes | Start node: a UUID or kind-qualified HFID (e.g. 'InfraDevice__atl1-edge1'). | |
| max_depth | No | Maximum relationship hops to explore (1-30). | |
| destination | Yes | End node: a UUID or kind-qualified HFID. | |
| kind_filter | No | Only traverse through nodes of these kinds. | |
| relationship_filter | No | Only follow these schema relationship identifiers (e.g. 'device__interface'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |