Hanzo
OpenapiKnowledge

Returns the caller org's knowledge as a node/edge graph shaped for a…

Returns the caller org's knowledge as a node/edge graph shaped for a force-directed renderer: pages, memories and synced sources as nodes; the page parent…

GET /v1/knowledge/graph

Addresshttps://api.hanzo.ai/v1/knowledge/graph
MethodGET
Operationget_knowledge_graph
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the caller org's knowledge as a node/edge graph shaped for a force-directed renderer: pages, memories and synced sources as nodes; the page parent tree, the wikilinks between pages, and each source's connector provenance as edges. Wikilink targets are resolved HERE by title or slug, so a rename never needs an edge rewrite and a link that matches no page renders as its own "unresolved" node instead of vanishing. ?project= narrows it. A store outage degrades to an honest empty graph, never a 5xx.

Request

1 field.

FieldInTypeRequiredDescription
projectquerystringProject narrows the graph to one project scope.

Response

StatusBodyMeaning
200graphOutok

200 body — 11 fields.

FieldInTypeAlwaysDescription
degradedbodybooleanDegraded is true when the store was unreachable and this graph is honestly empty rather than wrong.
edgesbodygraphEdge[]Edges are the parent tree, the resolved wikilinks and the connector provenance.
edges[].frombodystringFrom is the id of the node the edge starts at: the child page for a parent edge, the page holding the wikilink for a link edge, the kb-source for a provenance…
edges[].kindbodystringparent | link | provenance
edges[].tobodystringTo is the id of the node the edge points at: the parent page, the linked page, the kb-connector.
nodesbodygraphNode[]Nodes are the pages, memories, sources, connectors and unresolved link targets.
nodes[].idbodystring"<doctype>:<name>" — globally unique, click-to-open key
nodes[].namebodystringthe document name (empty for synthetic nodes)
nodes[].projectbodystringProject is the project scope the underlying document was saved under.
nodes[].titlebodystringdisplay label
nodes[].typebodystringkb-page | kb-memory | kb-source | kb-connector | unresolved

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Knowledge API · All Hanzo APIs · Interactive reference

How is this guide?

On this page