# API All endpoints are served by the backend service and proxied by nginx under `/api`. ## `GET /api/health` Returns: ```json { "ok": true } ``` ## `GET /api/config` Returns public runtime configuration with secrets removed. ## `GET /api/dashboard` Returns JSON state, drive usage, cached library files, cached extension breakdowns, and dry-run status. This endpoint does not scan the full media filesystem. ## `POST /api/scan` Runs one scanner pass immediately. In dry-run mode this only records plans. ## `POST /api/library/scan` Refreshes the cached library index. The scan only enters direct child folders of each media drive named `Movies`, `TV`, or `TV Shows`. ## `GET /api/downloads` Returns current files under `/downloads` plus recent Sortarr plans or moves whose source was under `/downloads`. ## `GET /api/releases` Returns missing/upcoming TV episodes derived from the cached library metadata, then appends any explicitly enabled public release providers. ## `GET /api/media/probe` Runs `ffprobe` for a selected media file under configured media/download roots and returns detected video, audio, and subtitle streams. ## `POST /api/media/tracks` Remuxes a selected media file to set an audio/subtitle stream as default or remove an embedded audio/subtitle stream. In dry-run mode it returns the ffmpeg command without modifying the file. ## `GET /api/theme/custom.css` Serves host-editable custom CSS from `/config/custom-theme.css`. ## `POST /api/settings` Updates runtime settings used by the current backend process. Supported keys: - `dry_run` - `scan_interval_seconds` - `settle_seconds` - `library_scan_max_files` - `library_scan_timeout_seconds` - `log_level` ## `GET /api/tools/subtitles` Audits the cached library index for media files missing sidecar subtitles. Run `POST /api/library/scan` first for current subtitle data. ## `GET /api/tools/transcoder` Builds a transcode queue for cached indexed media that is not already `.mp4`. ## `POST /api/tools/transcoder/run-next` Runs the next queued ffmpeg transcode when `dry_run` is disabled. In dry-run mode it reports what would run.