Back to KB
Difficulty
Intermediate
Read Time
4 min

Category Statistics API

By Codcompass TeamΒ·Β·4 min read

Category Statistics API

Overview

The /api/local-only/category-stats endpoint provides aggregated content metrics for each knowledge base (KB) category. It is designed primarily for internal crawlers, analytics dashboards, and content synchronization workflows that require an up-to-date snapshot of category health and article distribution.

When invoked, the endpoint queries the underlying database to calculate two key metrics per category:

  1. Published Count: The number of articles explicitly marked with a PUBLISHED status.
  2. Total with Status: The number of articles that have any non-null status value (useful for tracking content in draft, review, or archived states).

Additionally, the endpoint calculates the volume of published articles that are not currently assigned to any category, enabling content teams to identify orphaned or uncategorized material. This endpoint is typically called during system initialization, scheduled sync jobs, or when rendering category navigation panels that require live content counters.

Endpoint Reference

PropertyValue
Path/api/local-only/category-stats
HTTP MethodGET
AuthenticationPublic (Routing) / Secret-Required (Application Layer)
Rate LimitingNone enforced at the API gateway level
Response Formatapplication/json
Base URLhttps://[your-domain]/api/local-only/category-stats

Note on Authentication: Although routing configurations may mark this endpoint as public, the application layer enforces strict authorization via a local crawler guard. Requests must include the valid LOCAL_CRAWLER_UI_SECRET token, or the endpoint will return a 401 Unauthorized response.

Request Format

The endpoint does not accept query parameters or a reque

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back

Sources

  • β€’ api-reference