https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43137
--- Comment #27 from David Nind <[email protected]> --- Created attachment 202438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202438&action=edit Bug 43137: Add GET /api/v1/health endpoint REST API endpoint that returns the aggregated system health status. - Routes to Koha::REST::V1::Health#get - Requires catalogue permission (low bar for access) - Passes $c->stash(koha.user) to Koha::Health->status for filtering - Permission-based filtering: checks the user cannot see get restricted => 1 with empty alert arrays - Severity always reflects the unfiltered state (the dot is honest) - Core alerts use { code, params } for translatable messages - Plugin alerts use { message } (displayed as-is) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle && koha-plack --restart kohadev k$ prove -v t/db_dependent/api/v1/health.t => SUCCESS: All tests pass 3. Tests cover: - 401 for unauthenticated requests - 403 for users without catalogue permission - 200 with correct response structure for authorized users - Internal _class field not exposed in response 4. Sign off :-D Assisted-by: Sonnet 4 (Anthropic) Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
