Skip to main content
Nowledge MemNowledge Mem

Get Shortest Path

GET
/graph/shortest-path

Find all shortest paths between two nodes using KuzuDB ALL SHORTEST.

Note: KuzuDB does not support parameter binding in recursive relationship bounds, so max_depth is interpolated as a validated literal (ge=2, le=20).

Returns all shortest paths (same hop count, different routes) so the frontend can render every connection between the two nodes. The overview graph may not contain all intermediate nodes, so paths are drawn between visible positions.

Query Parameters

from_id*From Id

Source node ID

to_id*To Id

Target node ID

max_depth?Max Depth
Range2 <= value <= 20
Default10

Response Body

application/json

application/json

curl -X GET "https://example.com/graph/shortest-path?from_id=string&to_id=string"
null