Skip to main content
GET
kg_info

Authorizations

X-API-Key
string
header
required

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier.

Query Parameters

path_prefix
string | null

Scope node and edge counts to files under this prefix.

include_graph
boolean
default:false

Also return a drawable subgraph in graph: a representative sample of nodes and the edges among them, for a client that renders the graph. Off by default — the sample is far larger than the counts, and a caller that draws nothing has no use for it.

graph_nodes
integer
default:150

Node budget for the include_graph sample. Ignored when include_graph is false.

Required range: 1 <= x <= 500

Response

Successful Response

Snapshot metadata for the knowledge graph, optionally scoped to a path prefix.

snapshot_id is the cache key: it changes when the graph is rebuilt, so a caller can detect staleness without re-fetching everything. hubs are the highest-degree nodes among those a walk can actually expand from — useful entry points for an initial walk. A node above kg-walk's hub-degree cap is excluded here even if it outranks every hub shown: it is never a corridor, so seeding a walk on it would return only the seed.

built_at
string<date-time>
required
coverage
Coverage · object
required

What the access gate withheld, in counts and label names only.

Never a name, path, or fragment of withheld content. Naming the labels leaks nothing the caller cannot already read from the workspace config, and it turns "some results were withheld" into an actionable request.

edge_total
integer
required
edge_types
TypeCount · object[]
required
hubs
GraphNodeRef · object[]
required
node_total
integer
required
node_types
TypeCount · object[]
required
path_prefix
string | null
required
snapshot_id
string
required
graph
KgGraphSample · object | null

A subgraph small enough to draw, plus the shape of the graph it came from.

Sampling is the point: a real workspace graph has far more nodes than a node-link diagram can carry, so this is a representative slice — the backbone of the largest components — never the whole graph. Everything the slice cannot show is reported as a number beside it (sampled_from, component_total, isolated_nodes), so the picture is never mistaken for the census.