mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 07:25:08 +00:00
docs(rest-api): give the remote session protocol one page and move dl --remote setup to a user guide
This commit is contained in:
@@ -21,7 +21,7 @@ Per-service configuration, keyed by the service tag in any case (for example `EX
|
||||
several servers. On the command line, `--local` and `--server` override these keys. A REST API job ignores both keys.
|
||||
A REST API job takes the other keys that it accepts as download parameters as its defaults,
|
||||
above the `serve` defaults and below the values that the request sends.
|
||||
See [making a service remote by default](../../dev/rest-api/remote-sessions.md#making-a-service-remote-by-default).
|
||||
See [making a service remote by default](../../guide/remote-sessions.md#making-a-service-remote-by-default).
|
||||
|
||||
A service can also read settings of its own, such as a preferred metadata language. The service's own
|
||||
`config.yaml` and its README, when it has one, name them. To change one, copy its config key into this
|
||||
@@ -31,10 +31,10 @@ other values in the same section stay.
|
||||
|
||||
Over `--remote`, the server builds the service from its own config. The client sends only the
|
||||
config keys that the service lists for a client identity, see
|
||||
[your own device identity](../../dev/rest-api/remote-sessions.md#your-own-device-identity),
|
||||
[your own device identity](../../guide/remote-sessions.md#your-own-device-identity),
|
||||
and the strings, numbers and booleans of its `preferences` block. Each preference that you set
|
||||
replaces the server's value for that config key, in every licensing mode, see
|
||||
[your preferences](../../dev/rest-api/remote-sessions.md#your-preferences).
|
||||
[your preferences](../../guide/remote-sessions.md#your-preferences).
|
||||
For every other setting, the value in the server's config applies.
|
||||
|
||||
User- or device-specific values (API keys, account IDs, device attributes) belong in this block
|
||||
@@ -171,7 +171,7 @@ unshackle cannot fetch the list. Each synthetic command carries the server-side
|
||||
documentation, so `unshackle dl --remote <TAG> -h` shows the same help text as it does on the
|
||||
server. Service names resolve against the server's tags and aliases, not your local services.
|
||||
If the server does not offer a name to your API key, unshackle rejects the name and lists the
|
||||
tags it does offer. See [remote sessions](../../dev/rest-api/remote-sessions.md) for the
|
||||
tags it does offer. See [remote sessions](../../guide/remote-sessions.md) for the
|
||||
full setup.
|
||||
|
||||
## `serve`
|
||||
@@ -187,10 +187,10 @@ is the [REST API](../../dev/rest-api/index.md) section. These are the config key
|
||||
| `users` | dict | `{}` | Per-user API keys and their allowlists (see below). |
|
||||
| `tiers` | dict | `{}` | Named settings that `users` entries reference by name (see below). |
|
||||
| `services` | list | *(unset)* | Global service allowlist. Omit to allow all. |
|
||||
| `remote_only` | bool | `false` | Expose only the remote service session endpoints (health, services, search, session) and disable the rest of the REST API. |
|
||||
| `remote_only` | bool | `false` | Expose only the [remote session routes](../../dev/rest-api/remote-sessions.md#routes) and disable the rest of the REST API. |
|
||||
| `dashboard` | dict | *(unset)* | Developer dashboard: `key` is the API key for the read-only `/api/dashboard/` endpoints (status, remote sessions, remote session logs, jobs, keys, services, health, logs, SSE events). Unset leaves those routes unregistered, and a reload that removes the key makes them answer `404`. See [dashboard endpoints](../../dev/rest-api/dashboard.md). |
|
||||
| `session_ttl` | int (s) | `300` | Seconds a remote session can stay idle before it expires. A remote client sends keep-alive requests to its remote session during a download, so the remote session does not expire during a long download. A remote session that still logs in can stay idle for the larger of this value and 600 seconds. A client that closes or loses its channel and does not come back loses its remote session sooner: see [Client presence](../../dev/rest-api/remote-sessions.md#client-presence). |
|
||||
| `max_sessions` | int or null | `100` | Maximum concurrent remote sessions; at the cap the server evicts the oldest remote session of the API key that holds the most. Set it to `null` or `0` for no limit, which is also what `/api/dashboard/status` then reports, so a dashboard can tell "no cap" from a cap that happens to sit at the default. |
|
||||
| `session_ttl` | int (s) | `300` | Seconds a remote session can stay idle before it expires. An open session channel, or a request that works on the remote session, keeps it from expiring, so it does not expire during a long download. A remote session that still logs in can stay idle for the larger of this value and 600 seconds. A client that closes or loses its channel and does not come back loses its remote session sooner: see [Client presence](../../dev/rest-api/remote-sessions.md#client-presence). |
|
||||
| `max_sessions` | int or null | `100` | Maximum concurrent remote sessions; at the cap the server evicts the least recently used remote session of the API key that holds the most, and a remote session that a request works on goes last. Set it to `null` or `0` for no limit, which is also what `/api/dashboard/status` then reports, so a dashboard can tell "no cap" from a cap that happens to sit at the default. |
|
||||
| `history_limit` | int | `100` | How many finished jobs to retain in history. |
|
||||
| `compression_level` | int | `1` | gzip level for responses. |
|
||||
| `services_refresh_interval` | int (s) | `0` | How often the server pulls the git-backed service repositories in `directories.services` and hot-reloads the services that changed. `0` turns it off. A service with a running or queued job, or a live remote session, is staged and swaps to the new code as soon as its last job and session finish. |
|
||||
|
||||
Reference in New Issue
Block a user