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. Effectively 0 since Lenses were retired in ADR-0001 (computed live from system_lens nodes, of which none are created post-removal). Field preserved for API backward-compatibility.
sourcesintDocument sources (PDFs, text, CSV, etc.)
awaiting_confirmationintAlways 0 on this endpoint — the live count of sources parked pending domain confirmation is only computed by GET /api/v1/system/dashboard (counts.awaiting_confirmation). Present here for schema compatibility.

Example

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