Skip to content

Library and server statistics

Updated View as Markdown

Per-library content counts and a server state snapshot, computed on the server. Not part of the Komga API surface, so the endpoints are absent from the OpenAPI spec. They are the kmrs-native way to feed library overviews and admin dashboards: one call returns everything, instead of querying the actuator metrics one meter at a time.

Library statistics

GET /api/v1/stats/libraries — content counts for every library the caller can see, plus their total:

  • libraries — one entry per visible library, ordered by name: libraryId, name, series, books, fileSize (bytes), sidecars (administrators only). Libraries without content report zeros.
  • total — the same counts over all visible libraries.

All counts cover only the content the user is allowed to see (library sharing and content restrictions apply), matching what a book search would return. For an administrator this is the full library. Administrators also get a sidecars count in each library entry and in total; sidecars are scan artifacts with no visibility of their own, so the field is omitted for other users.

Server statistics

GET /api/v1/stats/server — a server state snapshot. Administrator only.

  • tasks — the background task queue and execution metrics, merged by task type: queueSize, and one types entry per task type that has queued tasks or recorded executions: type, queued, executions, totalTimeMs, maxTimeMs, failures
  • process — startTime, uptimeSeconds, cpuUsage (percent of total capacity), memoryBytes (resident set size)
  • totals — global content counts: libraries, series, books, fileSize (bytes), collections, readlists, sidecars
Navigation

Type to search…

↑↓ navigate↵ selectEsc close