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
| Field | Type | Description |
|---|---|---|
knowledge_nodes | int | Non-system nodes (excludes workflows) |
links | int | Total edge count |
templates | int | User-created templates (excludes system templates) |
workflows | int | Workflow count (nodes with template_id='system_workflow') |
lenses | int | Deprecated. Always 0 — Lenses were retired in ADR-0001. Field preserved for API backward-compatibility. |
sources | int | Document 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
}