Skip to content

feat: health check endpoint with API key auth + plugin ArrClient access#93

Merged
arediss merged 1 commit intomainfrom
feat/health-check-api-key
Apr 7, 2026
Merged

feat: health check endpoint with API key auth + plugin ArrClient access#93
arediss merged 1 commit intomainfrom
feat/health-check-api-key

Conversation

@arediss
Copy link
Copy Markdown
Owner

@arediss arediss commented Apr 7, 2026

Summary

Two features for the 0.4.0 release.

Health check endpoint (#20)

  • GET /api/app/health — returns status, version, uptime, database, and per-service connectivity (Radarr, Sonarr with versions)
  • Authenticated via X-Api-Key header or Authorization: Bearer token
  • Timing-safe key comparison (crypto.timingSafeEqual)
  • Admin API key management:
    • GET /admin/api-key — returns masked key only (f3d050b4••••••••c60f885)
    • POST /admin/api-key/generate — generates new key, returns full plaintext (only time it's shown)
    • DELETE /admin/api-key — revokes key
  • GET /admin/settings no longer leaks apiKey field
  • Frontend: API key section in General tab with masked display, regenerate, delete
  • Warning message when key is generated: "Copy now, won't be shown again"
  • Prisma migration: apiKey nullable field on AppSettings
  • i18n: EN + FR

Plugin ArrClient access (#92)

  • getArrClient(serviceType) added to PluginContext (type + implementation)
  • Plugins can now access any *arr service through the generic ArrClient interface
  • Enables future plugins like "Radarr Manager" to list movies, manage queue, etc.

Closes #20, closes #92

Test plan

  • curl -H "X-Api-Key: <key>" localhost:3456/api/app/health returns service status
  • curl localhost:3456/api/app/health returns 401
  • curl -H "X-Api-Key: wrong" localhost:3456/api/app/health returns 403
  • Frontend: generate, copy, regenerate, delete API key
  • Key masked on page reload, full key only after generate
  • Backend + frontend compile
  • i18n EN + FR complete

…lugins

Health check (#20):
- GET /api/app/health — returns status, version, uptime, service connectivity
- Authenticated via X-Api-Key header or Authorization: Bearer token
- Timing-safe key comparison (crypto.timingSafeEqual)
- Admin endpoints: GET/POST/DELETE /admin/api-key (get masked, generate, revoke)
- GET /admin/settings no longer leaks apiKey field
- Full key shown only at generation time with copy warning
- Frontend: API key section in General tab with masked display, copy, regenerate, delete
- Prisma migration: apiKey field on AppSettings
- i18n: EN + FR translations

Plugin ArrClient access (#92):
- getArrClient(serviceType) added to PluginContext interface and implementation
- Plugins can now access any *arr service through the generic ArrClient interface

Closes #20, closes #92
@arediss arediss merged commit 7a453f1 into main Apr 7, 2026
6 checks passed
@arediss arediss deleted the feat/health-check-api-key branch April 8, 2026 21:54
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.

feat: expose ArrClient to plugins via PluginContext feat: Health check endpoint for monitoring

1 participant