Get Knowledge Graph
GET /knowledge-graphThe neighbourhood of one item: the typed relations the consolidation engine drew.
The engine has been writing knowledge_edge on every pass since M7 and nothing could
read it. The walk is symmetric — a curator asking what is connected to a fact means
connected, not “what does it point at” — while every edge reports its own recorded
direction.
Both bounds are reported. truncated_at_depth and truncated_at_node_limit are the
difference between “this is the neighbourhood” and “this is as much of it as fits”, and a
client that cannot tell them apart draws missing knowledge as absent knowledge.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
root_item_id | query | string (uuid) | required | the item to explore outward from |
depth | query | integer | optional | Default 1. min 1 max 5 |
edge_kinds | query | part_of | supports | contradicts | derived_from | supersedes | relates_to | answers | shares_topic[] | null | optional | repeat to allow several kinds |
statuses | query | proposed | confirmed | rejected[] | null | optional | default: confirmed and proposed; rejected is a tombstone |
viewer_agent_id | query | string (uuid) | null | optional | read as this agent: unlocks its private bases |
knowledge_set | query | string | null | optional | a knowledge set’s slug; the walk stays inside that base min length 1 max length 120 |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | KnowledgeGraphView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X GET https://your-deployment.example.com/knowledge-graph \ -H "Authorization: Bearer $COBRE_TOKEN"Response — KnowledgeGraphView
Section titled “Response — KnowledgeGraphView”| Field | Type | Notes | |
|---|---|---|---|
root_item_id | string (uuid) | required | — |
depth | integer | required | — |
nodes | KnowledgeGraphNode[] | optional | — |
edges | KnowledgeGraphEdge[] | optional | — |
truncated_at_depth | boolean | optional | Default false. |
truncated_at_node_limit | boolean | optional | Default false. |