Initial commit
This commit is contained in:
73
docs/api.md
Normal file
73
docs/api.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# 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/library`
|
||||
|
||||
Returns the cached library summary and grouped movie/series collections for the Library page. Raw indexed file items stay server-side to keep routine dashboard refreshes small.
|
||||
|
||||
## `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. Settings can be sent as nested sections such as `{"app": {"dry_run": true}}` or as legacy top-level app keys.
|
||||
|
||||
Supported sections include `app`, `paths`, `library`, `metadata`, `theme`, `drives`, and `release_providers`. Runtime settings are saved in `/data/state.json`; they are not written back into TOML.
|
||||
|
||||
## `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.
|
||||
|
||||
## `GET /api/tools/duplicates`
|
||||
|
||||
Reports duplicate movie or series groups from the cached library index.
|
||||
Reference in New Issue
Block a user