Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

171 Indexer Torznab instance API endpoints

  • Status: Accepted
  • Date: 2026-01-31
  • Motivation:
    • Provide API coverage for Torznab instance lifecycle (create, rotate credentials, enable/disable, delete) backed by stored procedures.
    • Close ERD indexer checklist gaps with testable handlers and OpenAPI schema coverage.
  • Design notes:
    • Add API models for Torznab instance create/state requests and responses in revaer-api-models.
    • Extend indexer facade contract in revaer-api and wire revaer-app implementations to stored-proc data access.
    • Implement HTTP handlers with consistent error mapping and constant error messages; trim user input on ingress.
    • Add E2E coverage for Torznab instance endpoints and OpenAPI updates.
  • Test coverage summary:
    • Unit tests for error mapping and input trimming in the Torznab instance handlers.
    • App-layer tests for missing profile/instance validation.
    • API E2E coverage for Torznab instance create/rotate/state/delete flows.
  • Observability updates:
    • Reused existing tracing spans for indexer operations; no new metrics added.
  • Risk & rollback plan:
    • Risk: incorrect lifecycle wiring could leave orphaned Torznab instances or misstate enablement.
    • Rollback: revert API changes and use stored procedures to reset instance state from migrations/seed data.
  • Dependency rationale:
    • No new dependencies.