Skip to main content

Operations

Endpoints for monitoring a running instance and administering it. Health and metrics routes are unauthenticated; everything under /api/admin requires an admin session.

Health probes

Three probes with different meanings — do not point all of them at the same check.

RouteAuthUse for
/api/livenoneLiveness. Is the process up?
/api/readynoneReadiness. Can it serve traffic (dependencies reachable)?
/api/healthnoneGeneral health summary.
/api/health/detailssessionPer-dependency detail.

Wire a Kubernetes livenessProbe to /api/live and a readinessProbe to /api/ready. Using a dependency-checking endpoint for liveness causes the orchestrator to restart a healthy process when a downstream dependency blips — restarting fixes nothing and turns a partial outage into a crash loop.

/api/health/details requires a session because it reports dependency topology, which is useful to an operator and useful to an attacker.

Metrics and version

RouteAuthServes
/metricsnonePrometheus metrics.
/api/versionsessionRunning application version.
/api/configsessionClient-visible runtime configuration.
/api/changelogsessionRelease notes for the running version.

/api/version reads the same VERSION file that drives the OpenAPI info.version, so a deployment can be identified unambiguously.

/api/config is what the frontend calls at boot to discover which optional features are enabled — it reports capability, not secrets.

Statistics

Read-only aggregates backing the dashboard's charts.

RouteReports
/api/stats/overviewHeadline counts.
/api/stats/articles-over-timeArticle volume over time.
/api/stats/article-countsCounts by state.
/api/stats/sources-volumeVolume per source.
/api/stats/source-qualitySource quality signals.
/api/stats/triage-metricsTriage throughput.
/api/stats/category-mixDistribution across categories.
/api/stats/ingested-vs-handledIngested against triaged — your backlog trend.

/api/stats/ingested-vs-handled is the one to watch on a personal instance: a persistent gap means you are subscribed to more than you read, and /api/sources/cleanup-suggestions is the usual remedy.

AI statistics

RouteReports
/api/ai-stats/word-cloudTerm frequency across your corpus.
/api/ai-stats/embedding-map2-D projection of article embeddings.
/api/ai-stats/knowledge-graphEntity/relationship graph data.

The knowledge graph route depends on the optional Neo4j integration and degrades rather than failing when it is not configured. See Configuration → Neo4j knowledge graph.

Recommendations

RouteMethodPurpose
/api/recommendations/healthGETWhether the recommender has enough signal.
/api/recommendations/recalculate-minePOSTRecompute for the calling user.
/api/recommendations/recalculatePOSTRecompute across users.

Recalculation is expensive. Prefer recalculate-mine; the instance-wide variant is an administrative operation.

Admin endpoints

Everything below is mounted under /api/admin and gated on an admin session. A non-admin session receives 403.

User administration

RouteMethodPurpose
/api/admin/usersGETList users.
/api/admin/usersPOSTCreate a user.
/api/admin/users/generatePOSTGenerate a user with credentials.
/api/admin/users/{user_id}GETOne user.
/api/admin/users/{user_id}/passwordPATCHReset a password.
/api/admin/users/{user_id}DELETEDelete a user.

/api/admin/users/generate creates an account with server-generated credentials — useful for provisioning a guest or demo account without inventing a password by hand.

Instance analytics

RouteMethodReports
/api/admin/analyticsGETInstance-wide usage.
/api/admin/ai/metricsGETAI call volume and cost.
/api/admin/ai/qualityGETGeneration quality signals.
/api/admin/learning-agent/runsGETLearning-agent run history.

/api/admin/ai/metrics is the endpoint to check when generation costs rise unexpectedly — it attributes usage before you go looking at provider bills.

Operational guidance

  • Scrape /metrics, alert on /api/ready. Metrics tell you how the instance behaves; readiness tells you whether it is serving.
  • Watch source health, not just uptime. A fully healthy instance with a broken feed produces no articles and raises no alarm. Poll /api/sources/health.
  • Generation endpoints are the slow path. If request latency degrades, separate /api/ask, briefing, and lesson generation from ordinary reads before concluding the instance is undersized.