Get Knowledge Base Graph
GET /knowledge-graph/baseOne base as a whole: every item it holds and the relations among them.
The neighbourhood route walks outward from a fact; this one answers the question a console asks of a base — what does it know, and how does it hang together. They cannot be the same route: an item nothing has related to yet is unreachable from every root, and those are precisely the ones a base’s map has to show, because “nothing is connected yet” is the state the maintenance pass exists to change.
total_items and total_edges are the base’s real counts; the arrays are what fits
in a drawing. A client renders both, or it draws a slice as if it were the whole thing.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
kb_id | query | string (uuid) | required | the base to draw whole |
edge_kinds | query | part_of | supports | contradicts | derived_from | supersedes | relates_to | answers | shares_topic[] | null | optional | — |
statuses | query | proposed | confirmed | rejected[] | null | optional | default: confirmed and proposed; rejected is a tombstone |
viewer_agent_id | query | string (uuid) | null | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | KnowledgeBaseGraphView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X GET https://your-deployment.example.com/knowledge-graph/base \ -H "Authorization: Bearer $COBRE_TOKEN"Response — KnowledgeBaseGraphView
Section titled “Response — KnowledgeBaseGraphView”| Field | Type | Notes | |
|---|---|---|---|
kb_id | string (uuid) | required | — |
nodes | KnowledgeGraphNode[] | optional | — |
edges | KnowledgeGraphEdge[] | optional | — |
total_items | integer | optional | Default 0. |
total_edges | integer | optional | Default 0. |
truncated_at_node_limit | boolean | optional | Default false. |