Skip to content

Conversation

@IanLindsley
Copy link
Collaborator

Summary

  • add an admin log router that exposes listing, download, and recent filters
  • rely on the existing admin token guard for all endpoints; no CORS or OAuth
  • document the router location and add pytest coverage for the new API

Testing

  • scripts/check_repo.sh

Implemented the `/admin/logs` endpoints in a dedicated router that reuses the
existing admin-token guard and exposes list, download, and recent filters over
the resolved log directory. Wired the router into the API factory and documented
the new location in the spec. Added focused pytest coverage that verifies
metadata ordering, auth requirements, streaming downloads, traversal guards,
and the `days`/`limit` filtering behaviour.

Key files:
- bt_servant_engine/apps/api/routes/admin_logs.py
- bt_servant_engine/apps/api/app.py
- tests/apps/api/routes/test_admin_log_endpoints.py
- docs/bt-servant-log-api-spec.md

Tests: scripts/check_repo.sh
@IanLindsley IanLindsley merged commit 5ef439c into main Oct 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants