Get Knowledge Path
GET /knowledge-graph/pathThe shortest walk between two items, or found: false.
Not connected is an answer, not a 404: “are these two facts related, and how” is the
question, and a 404 would say the items do not exist. A 404 here means an endpoint the
caller cannot read, which is the /knowledge-items rule unchanged.
The parameters are spelled from and to on the wire because annex 05 §4.6 froze
them, and from is a Python keyword — hence the alias.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
from | query | string (uuid) | required | — |
to | query | string (uuid) | required | — |
max_hops | query | integer | optional | Default 4. min 1 max 8 |
edge_kinds | query | part_of | supports | contradicts | derived_from | supersedes | relates_to | answers | shares_topic[] | null | optional | — |
statuses | query | proposed | confirmed | rejected[] | null | optional | — |
viewer_agent_id | query | string (uuid) | null | optional | — |
knowledge_set | query | string | null | optional | a knowledge set’s slug; both endpoints must live in that base min length 1 max length 120 |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | KnowledgePathView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X GET https://your-deployment.example.com/knowledge-graph/path \ -H "Authorization: Bearer $COBRE_TOKEN"Response — KnowledgePathView
Section titled “Response — KnowledgePathView”| Field | Type | Notes | |
|---|---|---|---|
from_item_id | string (uuid) | required | — |
to_item_id | string (uuid) | required | — |
found | boolean | optional | Default false. |
hops | integer | optional | Default 0. |
max_hops | integer | required | — |
nodes | KnowledgeGraphNode[] | optional | — |
edges | KnowledgeGraphEdge[] | optional | — |