docs(rest-api): give the remote session protocol one page and move dl --remote setup to a user guide

This commit is contained in:
imSp4rky
2026-12-04 18:25:15 -07:00
parent b96c2a725e
commit d1b2395313
11 changed files with 1235 additions and 1246 deletions
+13 -23
View File
@@ -28,10 +28,10 @@ calls you can script against:
- **History and housekeeping**: read the log of finished jobs, inspect the server's
effective (redacted) configuration, examine external tool versions, and clear caches
or temp files.
- **Remote-download sessions**: a thin local client can authenticate against a
service *on the server*, then pull titles, tracks, and segment info back, and proxy
- **Remote sessions**: a thin local client can authenticate against a
service *on the server*, then pull titles, tracks, and segment info back, and relay
DRM licensing. This is how one machine with the credentials and CDMs can serve
downloads to another. See [Remote Sessions](remote-sessions.md).
downloads to another. See the [remote session protocol](remote-sessions.md).
Because every download runs as a queued job in a separate job worker process, the API is
well suited to running unattended: submit work, come back later, and read the result.
@@ -194,29 +194,19 @@ request and response in full.
| `POST` | `/api/maintenance/clear-temp` | Clear the temp directory. |
| `POST` | `/api/maintenance/refresh-services` | `git pull` each configured service repository and re-import the services that changed. |
### Remote-download sessions
### Remote sessions
The `/api/session/*`, `/api/tunnel` and `/api/tunnel/check` routes carry the remote sessions of
`dl --remote`. The [remote session protocol](remote-sessions.md#routes) lists each route.
| Method | Path | Purpose |
|---|---|---|
| `POST` | `/api/session/create` | Start a server-side, authenticated service session. |
| `GET` | `/api/session/{session_id}` | Remote session info and time-to-live. |
| `DELETE` | `/api/session/{session_id}` | Tear down a session. |
| `GET` | `/api/session/{session_id}/titles` | Titles for the session's title ID. |
| `POST` | `/api/session/{session_id}/tracks` | Tracks (with URLs) for a chosen title. |
| `POST` | `/api/session/{session_id}/segments` | Per-track segment/download details. |
| `POST` | `/api/session/{session_id}/segment_filter` | Server-side HLS segment filter results for one track. |
| `POST` | `/api/session/{session_id}/samples` | Server-side cbcs sample decryption for one track. |
| `POST` | `/api/session/{session_id}/license` | Proxy or server-side DRM licensing. |
| `POST` | `/api/session/{session_id}/keys` | Store the content keys the client proved on a track. |
| `POST` | `/api/session/{session_id}/keys/bad` | Report a server-vault content key that did not decrypt. |
| `GET` | `/api/session/{session_id}/channel` | WebSocket of the remote session channel: prompts, CDM calls, logs, login state. |
| `GET` | `/api/session/{session_id}/logs` | Drain the service's server-side log output. |
| `GET` | `/api/session/{session_id}/prompt` | Poll for interactive auth status/prompt. |
| `POST` | `/api/session/{session_id}/prompt` | Submit an answer to an auth prompt. |
| `GET` | `/api/remote/logins` | The logins of a [relayed](endpoints.md#remote-services-relay) list call that wait on you. |
| `POST` | `/api/remote/logins/{login_id}/input` | Answer the prompt of such a login. |
!!! note "Remote-only routes"
The health, services, search, and `/api/session/*` routes are the ones exposed
when the server runs with `--remote-only`. Everything else (downloads, jobs,
A server that runs with `--remote-only` exposes only the
[remote session routes](remote-sessions.md#routes) and the dashboard routes. Everything else (downloads, jobs,
history, config, maintenance) is only available in the full or `--api-only` modes.
## Authentication in one line
@@ -246,8 +236,8 @@ the full model, including per-key service allowlists.
shape, endpoint by endpoint.
- **[Job Lifecycle](job-lifecycle.md)**: how a download moves from `queued` to a
terminal state, live progress, cancellation, and retries.
- **[Remote Sessions](remote-sessions.md)**: the `/api/session/*` flow for driving a
service from a thin remote client.
- **[Remote Session Protocol](remote-sessions.md)**: the routes, login states,
licensing modes and message shapes of a remote session.
- **[Error Responses](errors.md)**: the standard error envelope, error codes, and
their HTTP statuses.