Skip to main content

Counts

Retrieve resource counts across the current database in a single request. This endpoint is optimized for header navigation display and dashboard summaries.

Endpoint

Get Counts

GET /api/v1/counts

Returns counts of all major resource types, with system resources filtered out.

Response Fields

FieldTypeDescription
knowledge_nodesintNon-system nodes (excludes workflows)
linksintTotal edge count
templatesintUser-created templates (excludes system templates)
workflowsintWorkflow count (nodes with template_id='system_workflow')
lensesintDeprecated. Always 0 — Lenses were retired in ADR-0001. Field preserved for API backward-compatibility.
sourcesintDocument sources (PDFs, text, CSV, etc.)

Example

curl http://localhost:8080/api/v1/counts
{
"knowledge_nodes": 142,
"links": 87,
"templates": 5,
"workflows": 3,
"lenses": 0,
"sources": 12
}