Retrieve the Knowledge Graph
Authorization
API Key Authenticate using API Key in request header
In: header
Query Parameters
Center the graph on this entity (ent_...) and only return the subgraph
within maxDepth hops of it; every node then carries its depth (hops
from the center, center = 0). Omit for the uncentered whole-graph view.
rootNodeID and focusNodeID are accepted as aliases.
Maximum hops from the center node. Only meaningful with nodeID. Defaults
to 2 and is clamped down to a system maximum (5).
int32Maximum number of edges per page (default 50, max 200).
int32Cursor: return edges whose KSUID sorts after this value.
Restrict to entities of these types. An edge is returned only when BOTH of its endpoints survive the type filter.
Only edges created at/after this RFC 3339 timestamp.
date-timeCase-insensitive substring match on canonical names. Both endpoints of an edge must match for the edge (and its nodes) to be returned.
Optional bucket public ID (bkt_...) to scope the read to one bucket.
Omit for the unscoped (all account+environment) view.
Response Body
application/json
curl -X GET "https://api.bem.ai/v3/knowledge-graph"{
"nodes": [
{
"id": "string",
"canonical": "string",
"type": "string",
"mentionCount": 0,
"depth": 0
}
],
"edges": [
{
"sourceId": "string",
"targetId": "string",
"relationType": "string",
"mentionCount": 0
}
],
"nextCursor": "string"
}