graph
Get Graph Stats
Get Neural Memory graph statistics for specified context.
Issue #82: Context-scoped stats. Issue #383: Authorization is delegated to PermissionService. Previously this endpoint hard-filtered by user_id == caller, hiding shared-context memories authored by other workspace members. Now:
- Shared context (``is_private = false``): any workspace member sees
the full graph for the context.
- Private context (``is_private = true``): only the private-context
creator can access the graph for that context. The creator-only
rule matches ``can_access_memory`` (returns ``False`` for
non-creators) and ``check_context_access`` (raises 403 for
non-creators). This endpoint deliberately **remaps that denial
to 404**, unifying with the cross-workspace-probe shape so
neither path leaks existence — an intentional divergence from
``check_context_access``'s 403 status code, not from its
authorization semantics.
- Cross-workspace probes and private-context access by non-creators
both surface as 404 (CWE-639 / OWASP A01 uniform disclosure)
to avoid existence leakage.
Args: context_id: Optional context ID. When absent, returns an empty graph (no scope = no visible edges).
Returns: Graph statistics including node/edge counts, top connections, etc.
get/api/v1/graph/stats
Request
- Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
- URL: https://memory.kagura-ai.com/api/v1/graph/stats
- Auth: none declared
Query parameters
context_idstring uuid nullable
Optional context ID. When absent, returns an empty graph (no scope = no visible edges) per Issue #383.
Headers
authorizationstring nullable
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.