API reference (English): every endpoint, one page per group # API Reference > Generated by `crates/lanrurugi-api-docgen` from the server's own route registrations: **248** endpoints in **39** groups Generated by `crates/lanrurugi-api-docgen` from the server’s own route registrations: **248** endpoints in **39** groups. Every endpoint lists its method, full path, parameters and a response example, and carries a request panel — point it at **your own instance** and the request goes straight there from this browser. * [Search API](./search/) — 9 * [Archive API](./archives/) — 29 * [Database API](./database/) — 14 * [Category API](./categories/) — 7 * [Tankoubon API](./tankoubons/) — 13 * [Stamps API](./stamps/) — 8 * [Plugin API](./plugins/) — 12 * [Shinobu API](./shinobu/) — 4 * [Minion API](./minion/) — 3 * [OPDS Catalog](./opds/) — 3 * [Miscellaneous other API](./misc/) — 5 * [Activity Log](./activity/) — 6 * [API Tokens](./api-tokens/) — 4 * [Archive Splitting](./archive-split/) — 5 * [Cross-origin Login](./auth-bridge/) — 4 * [Benchmark](./bench/) — 2 * [Bookmarks](./bookmarks/) — 13 * [Download Queue](./download-queue/) — 21 * [Duplicate Detection](./duplicates/) — 3 * [Font Patterns](./font-pattern/) — 2 * [Health](./health/) — 1 * [Background Jobs](./jobs/) — 3 * [Login](./login/) — 4 * [Logs](./logs/) — 1 * [OpenSearch](./opensearch/) — 1 * [Plugin Wizard](./plugin-wizard/) — 7 * [Preferences](./preferences/) — 2 * [Recommendations](./recommend/) — 1 * [Maintenance Scripts](./scripts/) — 3 * [Signed-in Devices](./sessions/) — 3 * [Settings](./settings/) — 4 * [Library Statistics](./stats/) — 3 * [Subscriptions](./subscriptions/) — 25 * [Tankoubon Grouping](./tankoubon-grouping/) — 8 * [Terminology Glossary](./terminology-glossary/) — 3 * [Page Translation](./translation/) — 6 * [Translation Settings](./translation-settings/) — 4 * [Version](./version/) — 1 * [AI Usage](./llm-usage/) — 1 What the browser needs before it can call your own instance (cross-origin access, HTTPS, a token) is in [Testing the API from these docs](../guide/api-testing/). [Download the OpenAPI document (JSON)](/openapi.json) # Activity Log > 6 endpoints. 6 endpoints. ## Delete selected activity entries [Section titled “Delete selected activity entries”](#delete-selected-activity-entries) DELETEhttp\://localhost:3000/api/activity Bulk delete by ID. Session-only — an API token of either role is refused, so a token cannot erase its own audit trail. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## List activity entries [Section titled “List activity entries”](#list-activity-entries) GEThttp\://localhost:3000/api/activity A page of activity entries, newest first, scoped to what the caller is allowed to see (see this file’s header). Entries whose target is an archive are annotated with whether that archive still exists, so a client can render “deleted since” instead of a dead link. 权限差异 * **你能看到哪些条目取决于你的身份。** 网页会话能看到全部记录;管理员令牌能看到它自己产生的、以及所有 guest 令牌产生的记录;guest 令牌只能看到它自己产生的记录。所以令牌持有者看到的是完整日志的一个**子集**——返回空不代表什么都没发生。 #### 查询参数 * cursorstring可选 来自上一次响应 `next_cursor` 的不透明分页游标。 * limitinteger · min: 1 · max: 200 · default: 50可选 无论请求多少都会被夹到一个小固定范围内——不设上限的话,单个请求就能强制触发任意大的扫描。 * start_tsinteger可选 只返回该 Unix 秒级时间戳(含)之后的活动记录。 * end_tsinteger可选 只返回该 Unix 秒级时间戳(含)之前的活动记录。 * actorstring可选 逗号分隔的操作者键;多个值是「或」的关系。 * action_typestring可选 逗号分隔的操作类型;多个值是「或」的关系。 * outcomestring可选 逗号分隔的结果;多个值是「或」的关系。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• cursorquerylimitquerystart_tsqueryend_tsqueryactorqueryaction_typequeryoutcomequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete one activity entry [Section titled “Delete one activity entry”](#delete-one-activity-entry) DELETEhttp\://localhost:3000/api/activity/{id} Deletes a single entry by ID. Session-only, for the same reason the bulk delete is. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000 idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## List activity filter facets [Section titled “List activity filter facets”](#list-activity-filter-facets) GEThttp\://localhost:3000/api/activity/facets The distinct action types and actors present in the log, each with a count — so a client can build a filter UI from what is actually there rather than from a hardcoded list. Like the list endpoint, this is scoped to what the caller may see: an actor only appears if the caller could read that actor’s entries. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Read the activity retention window [Section titled “Read the activity retention window”](#read-the-activity-retention-window) GEThttp\://localhost:3000/api/activity/retention How long activity entries are kept, in seconds. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Set the activity retention window [Section titled “Set the activity retention window”](#set-the-activity-retention-window) PUThttp\://localhost:3000/api/activity/retention Changes how long activity entries are kept. Session-only: a token must not be able to shorten how long its own trail survives. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # API Tokens > 4 endpoints. 4 endpoints. ## List API tokens [Section titled “List API tokens”](#list-api-tokens) GEThttp\://localhost:3000/api/tokens Every issued token’s metadata. The token secret itself is **never** included: it is returned exactly once, by the creation call below, and is not stored in a recoverable form. Requires a session-cookie login. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Create an API token [Section titled “Create an API token”](#create-an-api-token) POSThttp\://localhost:3000/api/tokens Issues a new token and returns its secret — **the only time it is ever returned**. Store it then; it cannot be recovered afterwards, only replaced. The expiry is computed from the server’s own clock, not from a client-supplied timestamp, so a client with a skewed clock cannot mint a token that outlives what it asked for. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Revoke an API token [Section titled “Revoke an API token”](#revoke-an-api-token) DELETEhttp\://localhost:3000/api/tokens/{id} Permanently revokes a token. Anything still using it starts failing immediately; the token cannot be un-revoked, only replaced. Requires a session-cookie login. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000 idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Rename an API token [Section titled “Rename an API token”](#rename-an-api-token) PATCHhttp\://localhost:3000/api/tokens/{id} Changes a token’s label. Requires a session-cookie login. #### 路径参数 * idstring必填 #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000 idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Archive Splitting > 5 endpoints. 5 endpoints. ## get_split_suggestion [Section titled “get_split_suggestion”](#get_split_suggestion) GEThttp\://localhost:3000/api/archives/{id}/split-suggestion Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_split_suggestion` in crates/lanrurugi-api/src/archive_split.rs:707. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Manual “analyze this archive now” endpoint [Section titled “Manual “analyze this archive now” endpoint”](#manual-analyze-this-archive-now-endpoint) POSThttp\://localhost:3000/api/archives/{id}/split-suggestion Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archive_split.rs:681), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Manual “analyze this archive now” endpoint. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /archives/{id}/split-tree` — returns the archive’s internal directory tree with nested [Section titled “GET /archives/{id}/split-tree — returns the archive’s internal directory tree with nested”](#get-archivesidsplit-tree--returns-the-archives-internal-directory-tree-with-nested) GEThttp\://localhost:3000/api/archives/{id}/split-tree Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archive_split.rs:508), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /archives/{id}/split-tree` — returns the archive’s internal directory tree with nested archives recursively expanded. This is a viewer-only endpoint: it does not call the LLM and does not create any output ZIPs. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## execute_split [Section titled “execute_split”](#execute_split) POSThttp\://localhost:3000/api/archives/{id}/split/execute Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `execute_split` in crates/lanrurugi-api/src/archive_split.rs:735. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## split_progress_stream [Section titled “split_progress_stream”](#split_progress_stream) GEThttp\://localhost:3000/api/archives/{id}/split/stream Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `split_progress_stream` in crates/lanrurugi-api/src/archive_split.rs:793. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Archive API > 29 endpoints. 29 endpoints. ## `DELETE /archives` (issue #63), body `{ids: [...]}` — same “plural resource, `DELETE` with a [Section titled “DELETE /archives (issue #63), body {ids: \[...\]} — same “plural resource, DELETE with a”](#delete-archives-issue-63-body-ids---same-plural-resource-delete-with-a) DELETEhttp\://localhost:3000/api/archives Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archives.rs:618), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /archives` (issue #63), body `{ids: [...]}` — same “plural resource, `DELETE` with a JSON body carrying which ones” shape `activity.rs::bulk_delete_activity` (`DELETE /activity`) already established in this codebase, not a `POST .../batch-delete` action-style path; `DELETE` *can* carry a request body per RFC 9110 (silently dropped by some older proxies/clients in practice, but Axum and this project’s own frontend both handle it fine, and precedent already exists here). The Batch page’s own “delete archives” operation previously fired `DELETE /archives/{id}` once per selected archive from the frontend as a plain sequential loop (no atomicity, no single audit point, and — since each request only ever reported its own pass/fail — no way for the caller to know *which* ids failed without diffing the library before/after). This does the same per-id work (`delete_one_archive`, identical cleanup to the single-delete endpoint) server-side in one request, and reports a per-id result list so the frontend can show exactly what happened rather than assuming full success. Session-only (`route_policy.csv` denies every token role and `anonymous`) — deliberately stricter than every other archive-mutating endpoint in this file, all of which a Token (Admin or Guest) can call. A single wrong/leaked API token being able to wipe an arbitrary-sized slice of the library in one request is a materially larger blast radius than any one of the single-target endpoints token access already permits, and this project has no legitimate automation use case for bulk deletion the way it does for e.g. scripted uploads or metadata edits — so the extra restriction has no real workflow it breaks. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get all Archives [Section titled “Get all Archives”](#get-all-archives) GEThttp\://localhost:3000/api/archives Returns a list of all Archives in the database. This doesn’t include Tankoubons by design. You can use the IDs of this JSON with the other endpoints. 权限差异 * **访客和匿名调用者完全不可达。** 这是无范围的列表:它返回书库中的全部档案,不做任何分类范围限制——给访客开放它等于绕过 `/api/search` 强制的那套「访客可见」限制。访客请走 `/api/search`。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete archive [Section titled “Delete archive”](#delete-archive) DELETEhttp\://localhost:3000/api/archives/{id} Delete both the archive metadata and the file stored on the server.\ 🙏 Please ask your user for confirmation before invoking this endpoint. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get archive categories [Section titled “Get archive categories”](#get-archive-categories) GEThttp\://localhost:3000/api/archives/{id}/categories Get all the Categories which currently refer to this Archive ID. #### 路径参数 * idstring必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Download archive [Section titled “Download archive”](#download-archive) GEThttp\://localhost:3000/api/archives/{id}/download Download an Archive from the server. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要下载的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Extract an Archive [Section titled “Extract an Archive”](#extract-an-archive) GEThttp\://localhost:3000/api/archives/{id}/files Get a list of URLs pointing to the images contained in an archive. If necessary, this endpoint also launches a background Minion job to extract the archive so it is ready for reading. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * forceboolean可选 强制在后台完整重新提取该档案。在该档案完全重新提取完成之前,后续的 `/api/archives/:id/page` 调用仍可能用到已有的缓存文件。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathforcequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Extract page thumbnails [Section titled “Extract page thumbnails”](#extract-page-thumbnails) POSThttp\://localhost:3000/api/archives/{id}/files/thumbnails Create thumbnails for every page of a given Archive. This endpoint will queue generation of the thumbnails in the background. If all thumbnails are detected as already existing, the call will return HTTP code 200.\ This endpoint can be called multiple times – If a thumbnailing job is already in progress for the given ID, it’ll just give you the ID for that ongoing job. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * forceboolean可选 是否强制重新生成全部缩略图,即使它们已经存在。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathforcequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clear Archive New flag [Section titled “Clear Archive New flag”](#clear-archive-new-flag) DELETEhttp\://localhost:3000/api/archives/{id}/isnew Clears the “New!” flag on an archive. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Set Archive New flag [Section titled “Set Archive New flag”](#set-archive-new-flag) PUThttp\://localhost:3000/api/archives/{id}/isnew Sets/Restores the “New!” flag on an archive. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get archive metadata [Section titled “Get archive metadata”](#get-archive-metadata) GEThttp\://localhost:3000/api/archives/{id}/metadata Get Metadata (title, tags) for a given Archive. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update archive metadata [Section titled “Update archive metadata”](#update-archive-metadata) PUThttp\://localhost:3000/api/archives/{id}/metadata Update tags and title for the given Archive.\ Data supplied to the server through this method will **overwrite** the previous data. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * titlestring可选 档案的新标题。 * tagsstring可选 档案的新标签。 * summarystring可选 档案的新摘要。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathtitlequerytagsquerysummaryquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get an archive page [Section titled “Get an archive page”](#get-an-archive-page) GEThttp\://localhost:3000/api/archives/{id}/page Get an archive page. This call is mainly used alongside `/api/archives/files`. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要下载的档案 ID。 #### 查询参数 * pathstring必填 图片路径。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpathquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /archives/{id}/page-dimensions?count=N` — natural pixel width/height for the first `N` [Section titled “GET /archives/{id}/page-dimensions?count=N — natural pixel width/height for the first N”](#get-archivesidpage-dimensionscountn--natural-pixel-widthheight-for-the-first-n) GEThttp\://localhost:3000/api/archives/{id}/page-dimensions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archives.rs:3688), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /archives/{id}/page-dimensions?count=N` — natural pixel width/height for the first `N` pages only, in the same order as `/files`’s own `pages` array (so the frontend can zip them together by index without a separate name-matching step). Additive to `/files`, not folded into it — existing callers of `/files` (the third-party-compatible file-list contract) shouldn’t have to pay for an archive pass with per-entry image-header parsing they never asked for; only the infinite-scroll reader view (the one caller that actually needs this, to size not-yet-loaded ``s accurately before jumping to a resume position — see `read_page_dimensions`’s own docs for why it’s bounded to just the pages before that jump, not the whole archive) calls this endpoint at all. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `DELETE /archives/{id}/patch` — deletes the sidecar `.patch.zip` (if any) and clears the [Section titled “DELETE /archives/{id}/patch — deletes the sidecar .patch.zip (if any) and clears the”](#delete-archivesidpatch--deletes-the-sidecar-patchzip-if-any-and-clears-the) DELETEhttp\://localhost:3000/api/archives/{id}/patch Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archives.rs:1160), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /archives/{id}/patch` — deletes the sidecar `.patch.zip` (if any) and clears the archive’s `has_patch` flag. Lets the user undo a patch — e.g. to replace it with pages from a different source after re-running the comparison flow — without touching the archive itself. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update reading progression [Section titled “Update reading progression”](#update-reading-progression) PUThttp\://localhost:3000/api/archives/{id}/progress/{page} Tell the server which page of this Archive you’re currently showing/reading, so that it updates its internal reading progression accordingly.\ This endpoint will also update the date this Archive was last read, using the current server timestamp. You should call this endpoint only when you’re sure the user is currently reading the page you present.\ **Don’t** use it when preloading images off the server. Whether to make reading progression regressible or not is up to the client. (The web client will reduce progression if the user starts reading previous pages)\ Consider however removing the “New!” flag from an archive when you start updating its progress - The web client won’t display any reading progression if the new flag is still set. ⚠ If the server is configured to use clientside progress tracking, this API call will return an error!\ Make sure to check using `/api/info` whether the server tracks reading progression or not before calling this endpoint. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 * pageinteger必填 要更新到的当前阅读页码。 **必须**是正整数,且不超过该档案的总页数。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `PUT /archives/{id}/rename` — additive, no legacy equivalent (legacy has no archive-rename [Section titled “PUT /archives/{id}/rename — additive, no legacy equivalent (legacy has no archive-rename”](#put-archivesidrename--additive-no-legacy-equivalent-legacy-has-no-archive-rename) PUThttp\://localhost:3000/api/archives/{id}/rename Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/archives.rs:1277), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `PUT /archives/{id}/rename` — additive, no legacy equivalent (legacy has no archive-rename feature at all; verified via `~/LANraragi/lib/LANraragi/Controller/*.pm` and `public/js/edit.js` having no `rename` reference anywhere). Renames the archive’s on-disk file (not just its stored `title`/`name`), keeping `Archive::file` and `LRR_FILEMAP` in sync — modeled on `download_manager::ingest`’s own staging-file-to-`archive_dir` rename fixup, the closest existing precedent for “the archive’s file path changed, update the two places that track it”. A sidecar `.patch.zip` (see `delete_patch`’s own docs on how it’s associated — same directory, same stem, purely by filename convention) is renamed alongside the archive itself: leaving it under the old stem would silently break `patch::patch_path_for`’s lookup for every future request, making an existing patch invisible without deleting anything or erroring — the kind of silent data-loss-adjacent bug that’s much worse than a rename this function could instead just reject outright. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get archive tankoubons [Section titled “Get archive tankoubons”](#get-archive-tankoubons) GEThttp\://localhost:3000/api/archives/{id}/tankoubons Get all the Tankoubons which currently refer to this Archive ID. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get archive thumbnail [Section titled “Get archive thumbnail”](#get-archive-thumbnail) GEThttp\://localhost:3000/api/archives/{id}/thumbnail Get a Thumbnail image for a given Archive. This endpoint will return a placeholder image if it doesn’t already exist. If you want to queue generation of the thumbnail in the background, you can use the no_fallback query parameter. This will give you a background job ID instead of the placeholder. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID #### 查询参数 * no_fallbackstring · enum: true | false可选 关闭占位图,把缩略图排入提取队列,并返回 code 202 的 JSON。图片已存在时该参数不起作用。(无论哪种情况,只要图片已存在就会以 code 200 返回它) * pageinteger · min: 0可选 指定要取哪一页的缩略图,默认为封面,也就是第 1 页。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathno_fallbackquerytruepagequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update archive thumbnail [Section titled “Update archive thumbnail”](#update-archive-thumbnail) PUThttp\://localhost:3000/api/archives/{id}/thumbnail Update the cover thumbnail for the given Archive. You can specify a page number to use as the thumbnail, or you can use the default thumbnail. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * pageinteger可选 用哪一页生成缩略图,默认第 1 页。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## get_page_thumbnails [Section titled “get_page_thumbnails”](#get_page_thumbnails) GEThttp\://localhost:3000/api/archives/{id}/thumbnails Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_page_thumbnails` in crates/lanrurugi-api/src/archives.rs:3870. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Remove entry from Archive Table of Contents [Section titled “Remove entry from Archive Table of Contents”](#remove-entry-from-archive-table-of-contents) DELETEhttp\://localhost:3000/api/archives/{id}/toc Delete an entry from the Table of Contents of a given Archive. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * pageinteger必填 要删除的章节页码。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Add entry to Archive Table of Contents [Section titled “Add entry to Archive Table of Contents”](#add-entry-to-archive-table-of-contents) PUThttp\://localhost:3000/api/archives/{id}/toc Add an entry to the Table of Contents of a given Archive. The ToC is stored as a JSON-encoded key-value array mapping a page to a title for the chapter/section starting at that page. #### 路径参数 * idstring · min: 40 · max: 40 · pattern必填 要处理的档案 ID。 #### 查询参数 * pageinteger必填 章节的起始页码。 * titlestring必填 章节标题。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagequerytitlequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get all untagged archives [Section titled “Get all untagged archives”](#get-all-untagged-archives) GEThttp\://localhost:3000/api/archives/untagged Get Archives that don’t have any tags recorded. This follows the same rules as the Batch Tagging filter and will include Archives that have parody:, date_added:, series: or artist: tags. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Upload Archive [Section titled “Upload Archive”](#upload-archive) PUThttp\://localhost:3000/api/archives/upload Upload an Archive to the server.\ If a SHA1 checksum of the Archive is included, the server will perform an optional in-transit, file integrity validation, and reject the upload if the server-side checksum does not match. #### 请求体 multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Start or re-attach to a resumable upload [Section titled “Start or re-attach to a resumable upload”](#start-or-re-attach-to-a-resumable-upload) POSThttp\://localhost:3000/api/archives/upload/session Creates a session (an empty staged file plus a sidecar describing it) and returns the id. If `client_key` matches a session that is still alive, that session is returned instead, with the offset its bytes are already at — which is what makes a page refresh resumable rather than restarting the transfer. The returned `offset` is always read from the staged file’s real length, never from the sidecar, so a truncated or edited sidecar cannot make the server believe it holds bytes it does not. Sessions that have not been touched for 24 hours are swept by the operations here; the staged bytes also live in `temp_dir`, so `DELETE /api/tempfolder` reclaims them too. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Abandon a session [Section titled “Abandon a session”](#abandon-a-session) DELETEhttp\://localhost:3000/api/archives/upload/session/{id} Drops the staged bytes and the sidecar. Safe to call on an unknown id. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Upload session status [Section titled “Upload session status”](#upload-session-status) GEThttp\://localhost:3000/api/archives/upload/session/{id} The handshake a resuming client starts from: how many bytes the server actually holds for this session. `404` means unknown, expired, or already completed — in every case the client’s correct move is to start a new session. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Append one chunk [Section titled “Append one chunk”](#append-one-chunk) PUThttp\://localhost:3000/api/archives/upload/session/{id} Appends the request body to the staged file, but only at the position the client claims. `Upload-Offset` is required and must equal the staged file’s real length; the response always reports the authoritative offset, including on failure: * `204` — the chunk was appended; `Upload-Offset` is the new length. * `409` — the client’s offset disagrees with the disk (a lost response, a retried chunk, two tabs); `Upload-Offset` says where to resume from. * `400` — missing or malformed `Upload-Offset`. A connection that dies mid-chunk keeps whatever bytes reached the disk and reports the offset, so a partial chunk is just fewer bytes rather than a corrupt one. The body is bounded at 64 MiB (the one-shot route is deliberately unbounded; a chunk is supposed to be small). #### 路径参数 * idstring必填 #### 请求头 * Upload-Offsetinteger必填 Byte position this chunk starts at; must equal the server's own length. #### 请求体 application/octet-stream #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Finish a session and ingest it [Section titled “Finish a session and ingest it”](#finish-a-session-and-ingest-it) POSThttp\://localhost:3000/api/archives/upload/session/{id}/complete Verifies what landed, hashes it, and hands it to the same ingest the one-shot route uses — including the persistent download-queue row, so a completed upload shows up (and can be removed) exactly like any other queue item. Verification: a `file_size` announced at session creation must equal the staged length (`417` otherwise, and the staged bytes are dropped), and an optional `file_checksum` is compared against the SHA-1 of the finished file (`417` on mismatch). That SHA-1 is computed by reading the staged file once at this point rather than persisting incremental hasher state: a resumed upload’s early chunks were hashed by processes that are long gone, and state that can silently desync from the bytes on disk is a worse trade than one sequential read of an already-local file. After this call the session no longer exists. #### 路径参数 * idstring必填 #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Cross-origin Login > 4 endpoints. 4 endpoints. ## bridge_callback [Section titled “bridge_callback”](#bridge_callback) GEThttp\://localhost:3000/api/auth/bridge/callback Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `bridge_callback` in crates/lanrurugi-api/src/auth_bridge.rs:599. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## prepare_bridge [Section titled “prepare_bridge”](#prepare_bridge) GEThttp\://localhost:3000/api/auth/bridge/prepare Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `prepare_bridge` in crates/lanrurugi-api/src/auth_bridge.rs:402. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## start_bridge [Section titled “start_bridge”](#start_bridge) GEThttp\://localhost:3000/api/auth/bridge/start Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `start_bridge` in crates/lanrurugi-api/src/auth_bridge.rs:464. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## get_auth_config [Section titled “get_auth_config”](#get_auth_config) GEThttp\://localhost:3000/api/auth/config Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_auth_config` in crates/lanrurugi-api/src/auth_bridge.rs:380. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Benchmark > 2 endpoints. 2 endpoints. ## get_report [Section titled “get_report”](#get_report) GEThttp\://localhost:3000/api/bench/{reportid} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_report` in crates/lanrurugi-api/src/bench.rs:107. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Runs the cross-system comparison against the caller-supplied legacy/new endpoints (both are [Section titled “Runs the cross-system comparison against the caller-supplied legacy/new endpoints (both are”](#runs-the-cross-system-comparison-against-the-caller-supplied-legacynew-endpoints-both-are) POSThttp\://localhost:3000/api/bench/run Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bench.rs:65), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Runs the cross-system comparison against the caller-supplied legacy/new endpoints (both are external HTTP targets from this crate’s point of view — even when “new” happens to be this same running instance, reached via its own bind address — so one implementation drives either case identically, matching how `lanrurugi-bench-compare` works standalone). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Bookmarks > 13 endpoints. 13 endpoints. ## `GET /archives/{id}/bookmarks` — unpaginated, just this one archive’s bookmarked pages [Section titled “GET /archives/{id}/bookmarks — unpaginated, just this one archive’s bookmarked pages”](#get-archivesidbookmarks--unpaginated-just-this-one-archives-bookmarked-pages) GEThttp\://localhost:3000/api/archives/{id}/bookmarks Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:479), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /archives/{id}/bookmarks` — unpaginated, just this one archive’s bookmarked pages (ascending, each with its resolved filename). Used by the reader (is the current page bookmarked? — only `page` matters there) and `BookmarkHoverGrid` (needs both `page` and `filename` for its caption, previously a second `GET /archives/{id}/files` call). Doesn’t require the archive to exist — same posture as `remove_bookmark`, a nonexistent archive simply has no bookmarks to report (and no filenames to resolve). 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `DELETE /archives/{id}/bookmarks/{page}` — idempotent, same as [Section titled “DELETE /archives/{id}/bookmarks/{page} — idempotent, same as”](#delete-archivesidbookmarkspage--idempotent-same-as) DELETEhttp\://localhost:3000/api/archives/{id}/bookmarks/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:751), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /archives/{id}/bookmarks/{page}` — idempotent, same as `BookmarksRepository::remove`’s own contract; doesn’t check archive existence first since removing a bookmark for an already-deleted archive is a legitimate cleanup, not an error. The activity-log lookup below is a *best-effort* label fetch only, separate from that leniency — a missing archive still lets the removal itself proceed, just with `target.label: None` (falls back to `target.id` alone, same as any other action type whose resource vanished first). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /archives/{id}/bookmarks/{page}` — bookmarks does not validate `page` against the [Section titled “POST /archives/{id}/bookmarks/{page} — bookmarks does not validate page against the”](#post-archivesidbookmarkspage--bookmarks-does-not-validate-page-against-the) POSThttp\://localhost:3000/api/archives/{id}/bookmarks/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:689), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /archives/{id}/bookmarks/{page}` — bookmarks does not validate `page` against the archive’s real `pagecount`, matching `update_progress`’s own leniency (`archives.rs`) — the reader is the only caller and always passes its own current, already-valid page. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `PUT /archives/{id}/bookmarks/{page}/name` — sets or clears this bookmark’s own name [Section titled “PUT /archives/{id}/bookmarks/{page}/name — sets or clears this bookmark’s own name”](#put-archivesidbookmarkspagename--sets-or-clears-this-bookmarks-own-name) PUThttp\://localhost:3000/api/archives/{id}/bookmarks/{page}/name Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:562), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `PUT /archives/{id}/bookmarks/{page}/name` — sets or clears this bookmark’s own name. `404`s if the bookmark itself doesn’t exist yet (a name can’t outlive the bookmark it names, and setting one on a nonexistent bookmark would silently create an orphaned `NAMES_HASH_KEY` entry no `add_bookmark` call ever cleans up) — matches `add_stamp`’s own “archive must exist first” posture, just checking bookmark existence instead of archive existence. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /bookmarks` — every bookmark, aggregated by archive, sorted and paginated per `sort`/ [Section titled “GET /bookmarks — every bookmark, aggregated by archive, sorted and paginated per sort/”](#get-bookmarks--every-bookmark-aggregated-by-archive-sorted-and-paginated-per-sort) GEThttp\://localhost:3000/api/bookmarks Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:252), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /bookmarks` — every bookmark, aggregated by archive, sorted and paginated per `sort`/ `cursor`/`limit`. A bookmark whose archive has since been deleted is silently dropped from the result rather than erroring the whole list (same tolerance `BookmarksRepository::list_all` already applies to malformed individual entries — one dangling reference shouldn’t take down every other still-valid bookmark). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /bookmarks/hover-page-order` — the saved `BookmarkHoverGrid` page-order preference [Section titled “GET /bookmarks/hover-page-order — the saved BookmarkHoverGrid page-order preference”](#get-bookmarkshover-page-order--the-saved-bookmarkhovergrid-page-order-preference) GEThttp\://localhost:3000/api/bookmarks/hover-page-order Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:984), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /bookmarks/hover-page-order` — the saved `BookmarkHoverGrid` page-order preference (`None` when never set; the frontend applies its own default, `"pageDesc"`, in that case). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Not recorded to the activity log — a display-only preference, same posture `settings.rs`’s own [Section titled “Not recorded to the activity log — a display-only preference, same posture settings.rs’s own”](#not-recorded-to-the-activity-log--a-display-only-preference-same-posture-settingsrss-own) PUThttp\://localhost:3000/api/bookmarks/hover-page-order Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:1002), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Not recorded to the activity log — a display-only preference, same posture `settings.rs`’s own `theme` field takes (no `record_manual` call either). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /bookmarks/only-matching` — the saved “only show bookmarks that themselves matched `q`” [Section titled “GET /bookmarks/only-matching — the saved “only show bookmarks that themselves matched q””](#get-bookmarksonly-matching--the-saved-only-show-bookmarks-that-themselves-matched-q) GEThttp\://localhost:3000/api/bookmarks/only-matching Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:1018), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /bookmarks/only-matching` — the saved “only show bookmarks that themselves matched `q`” preference (`false` when never set, matching the historical always-show-everything behavior). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Not recorded to the activity log — same display-only posture `put_hover_page_order` takes [Section titled “Not recorded to the activity log — same display-only posture put_hover_page_order takes”](#not-recorded-to-the-activity-log--same-display-only-posture-put_hover_page_order-takes) PUThttp\://localhost:3000/api/bookmarks/only-matching Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:1035), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Not recorded to the activity log — same display-only posture `put_hover_page_order` takes. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /tankoubons/{id}/bookmarks` — every bookmark across every member archive, translated into [Section titled “GET /tankoubons/{id}/bookmarks — every bookmark across every member archive, translated into”](#get-tankoubonsidbookmarks--every-bookmark-across-every-member-archive-translated-into) GEThttp\://localhost:3000/api/tankoubons/{id}/bookmarks Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:877), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /tankoubons/{id}/bookmarks` — every bookmark across every member archive, translated into the Tankoubon’s own global page numbering. Unpaginated, ascending by global page — matches `list_bookmarks_for_archive`’s own contract (used the same way, by `BookmarkHoverGrid`, just for a Tankoubon card instead of a plain archive card). A member archive that no longer exists (or has an empty `pagecount`, e.g. not yet scanned) contributes nothing, silently, rather than failing the whole request — same tolerance `TankoubonFullResponse`’s own docs describe for `full_data` silently omitting a missing member. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `DELETE /tankoubons/{id}/bookmarks/{page}` — same resolve-then-delegate shape as [Section titled “DELETE /tankoubons/{id}/bookmarks/{page} — same resolve-then-delegate shape as”](#delete-tankoubonsidbookmarkspage--same-resolve-then-delegate-shape-as) DELETEhttp\://localhost:3000/api/tankoubons/{id}/bookmarks/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:832), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /tankoubons/{id}/bookmarks/{page}` — same resolve-then-delegate shape as \[`add_tank_bookmark`], onto \[`remove_bookmark`]. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /tankoubons/{id}/bookmarks/{page}` — resolves the Tankoubon-global `page` down to the [Section titled “POST /tankoubons/{id}/bookmarks/{page} — resolves the Tankoubon-global page down to the”](#post-tankoubonsidbookmarkspage--resolves-the-tankoubon-global-page-down-to-the) POSThttp\://localhost:3000/api/tankoubons/{id}/bookmarks/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:817), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /tankoubons/{id}/bookmarks/{page}` — resolves the Tankoubon-global `page` down to the real member archive + local page (`tankoubons::resolve_tank_page`) and delegates to \[`add_bookmark`]’s own logic; the write itself still lands on the real archive id, same as a stamp placed while reading a Tankoubon (`stamps.rs`’s own Tankoubon routes) — `bookmarks.rs`’s underlying `BookmarksRepository` has no `TANK_` concept of its own and never needs one. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `PUT /tankoubons/{id}/bookmarks/{page}/name` — same resolve-then-delegate shape as [Section titled “PUT /tankoubons/{id}/bookmarks/{page}/name — same resolve-then-delegate shape as”](#put-tankoubonsidbookmarkspagename--same-resolve-then-delegate-shape-as) PUThttp\://localhost:3000/api/tankoubons/{id}/bookmarks/{page}/name Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/bookmarks.rs:665), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `PUT /tankoubons/{id}/bookmarks/{page}/name` — same resolve-then-delegate shape as `add_tank_bookmark`/`remove_tank_bookmark`, onto \[`rename_bookmark`]. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Category API > 7 endpoints. 7 endpoints. ## Get all Categories [Section titled “Get all Categories”](#get-all-categories) GEThttp\://localhost:3000/api/categories Get all the categories saved on the server. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Create a Category [Section titled “Create a Category”](#create-a-category) PUThttp\://localhost:3000/api/categories Create a new Category. #### 请求体 application/x-www-form-urlencoded, multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete Category [Section titled “Delete Category”](#delete-category) DELETEhttp\://localhost:3000/api/categories/{id} #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get a single Category [Section titled “Get a single Category”](#get-a-single-category) GEThttp\://localhost:3000/api/categories/{id} Get the details of the specified category ID. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update Category [Section titled “Update Category”](#update-category) PUThttp\://localhost:3000/api/categories/{id} Modify a Category. #### 请求体 application/x-www-form-urlencoded, multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Remove an Archive from a Category [Section titled “Remove an Archive from a Category”](#remove-an-archive-from-a-category) DELETEhttp\://localhost:3000/api/categories/{id}/{archive} Remove an Archive ID from a Category. #### 路径参数 * idstring · min: 14 · max: 14 · pattern必填 要移出的分类 ID。 * archivestring · min: 40 · max: 40 · pattern必填 要移除的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpatharchivepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Add an Archive to a Category [Section titled “Add an Archive to a Category”](#add-an-archive-to-a-category) PUThttp\://localhost:3000/api/categories/{id}/{archive} Adds the specified Archive ID (see Archive API) to the given Category. #### 路径参数 * idstring · min: 14 · max: 14 · pattern必填 要加入的分类 ID。 * archivestring · min: 40 · max: 40 · pattern必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpatharchivepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Database API > 14 endpoints. 14 endpoints. ## Get a backup JSON [Section titled “Get a backup JSON”](#get-a-backup-json) GEThttp\://localhost:3000/api/database/backup Scans the entire database and returns a backup in JSON form. Consider using the POST variant if your database is large, as this basic GET endpoint might time out if it takes too long to generate the backup.\ This backup can be reimported manually through the Backup and Restore feature. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Queue a backup job [Section titled “Queue a backup job”](#queue-a-backup-job) POSThttp\://localhost:3000/api/database/backup Queues a Minion job to generate a backup JSON file.\ Use the returned job ID to check progress and download the file once complete. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Download backup JSON from completed job [Section titled “Download backup JSON from completed job”](#download-backup-json-from-completed-job) GEThttp\://localhost:3000/api/database/backup/{jobid} Downloads the backup JSON file generated by a completed backup job. #### 路径参数 * jobidinteger必填 已完成的备份任务 ID。 #### 查询参数 * formatstring · enum: json | file可选 返回的备份格式,默认 `file`。`json` 会以 JSON 响应返回备份。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• jobidpathformatqueryjson 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clean the Database [Section titled “Clean the Database”](#clean-the-database) POSThttp\://localhost:3000/api/database/clean Cleans the Database, hiding then removing entries for files that are no longer on the filesystem.\ Entries that are no longer on the filesystem are only unlinked at first so they don’t appear in the UI – A subsequent run of this cleanup will **delete** unlinked entries. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Drop the Database [Section titled “Drop the Database”](#drop-the-database) POSThttp\://localhost:3000/api/database/drop Delete the entire database, including user preferences. This is a rather dangerous endpoint, invoking it might lock you out of the server as a client! #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Imports a LANraragi (or LANrurugi) backup JSON file the caller uploads directly — no live [Section titled “Imports a LANraragi (or LANrurugi) backup JSON file the caller uploads directly — no live”](#imports-a-lanraragi-or-lanrurugi-backup-json-file-the-caller-uploads-directly--no-live) POSThttp\://localhost:3000/api/database/import-legacy Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/database.rs:789), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Imports a LANraragi (or LANrurugi) backup JSON file the caller uploads directly — no live connection to any remote Redis instance (see `lanrurugi_backup::import_legacy`’s own module docs for why: the official LANraragi Docker image never exposes its bundled Redis outside the container by default). Same multipart-file-upload shape as `queue_restore` above, but this is deliberately its own independent handler/parsing/persistence path, not a variant of `queue_restore` — see `import_legacy`’s own docs on why the two must not share code despite superficially similar JSON shapes. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## How many times this instance has ever run a LANraragi import — read by the frontend before [Section titled “How many times this instance has ever run a LANraragi import — read by the frontend before”](#how-many-times-this-instance-has-ever-run-a-lanraragi-import--read-by-the-frontend-before) GEThttp\://localhost:3000/api/database/import-legacy/count Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/database.rs:998), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** How many times this instance has ever run a LANraragi import — read by the frontend before showing the import UI, so it can warn (“you’ve done this before — consider a full backup first”) on a 2nd-or-later import without waiting for the import itself to complete. Read-only, separate from `queue_import_legacy`’s own increment (which happens after a real import finishes), matching `ImportSnapshotRepository::import_count`’s own read/increment split. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Newest-first metadata list (no `document` payload — see [Section titled “Newest-first metadata list (no document payload — see”](#newest-first-metadata-list-no-document-payload--see) GEThttp\://localhost:3000/api/database/import-snapshots Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/database.rs:1025), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Newest-first metadata list (no `document` payload — see `ImportSnapshotRepository::list_metadata`’s own docs) for the Backup page’s Time-Machine-style rollback-point picker. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## delete_import_snapshot [Section titled “delete_import_snapshot”](#delete_import_snapshot) DELETEhttp\://localhost:3000/api/database/import-snapshots/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `delete_import_snapshot` in crates/lanrurugi-api/src/database.rs:1067. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Returns the full `BackupDocument` payload as a downloadable JSON file — same shape [Section titled “Returns the full BackupDocument payload as a downloadable JSON file — same shape”](#returns-the-full-backupdocument-payload-as-a-downloadable-json-file--same-shape) GEThttp\://localhost:3000/api/database/import-snapshots/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/database.rs:1045), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Returns the full `BackupDocument` payload as a downloadable JSON file — same shape `POST /database/restore` accepts, so the frontend’s own “restore” flow can take this file straight back in with zero format translation on either side. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clear All “New” flags [Section titled “Clear All “New” flags”](#clear-all-new-flags) DELETEhttp\://localhost:3000/api/database/isnew Clears the “New!” flag on all archives. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## rebuild_index [Section titled “rebuild_index”](#rebuild_index) POSThttp\://localhost:3000/api/database/rebuild-index Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `rebuild_index` in crates/lanrurugi-api/src/database.rs:706. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Queue a restore job [Section titled “Queue a restore job”](#queue-a-restore-job) POSThttp\://localhost:3000/api/database/restore Queues a Minion job to restore from a backup JSON file.\ Use the returned job ID to check progress. #### 请求体 multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get Statistics [Section titled “Get Statistics”](#get-statistics) GEThttp\://localhost:3000/api/database/stats Get tags from the database, with a value symbolizing their prevalence. #### 查询参数 * minweightinteger可选 只想取权重不低于给定最小值的标签时传这个参数。 不传时默认为 1,即返回全部标签。 * hide_excluded_namespacesstring可选 设为 true 时,把服务端设置里配置的命名空间从结果中排除。默认返回全部标签。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• minweightqueryhide_excluded_namespacesquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Download Queue > 21 endpoints. 21 endpoints. ## List queue items [Section titled “List queue items”](#list-queue-items) GEThttp\://localhost:3000/api/download_queue Every item in the download queue, in whatever state it currently holds. For live updates prefer `/download_queue/stream`, which pushes state changes as they happen rather than requiring a poll. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Add items to the queue [Section titled “Add items to the queue”](#add-items-to-the-queue) POSThttp\://localhost:3000/api/download_queue Bulk add. The caller has already decided which download plugin’s `url_pattern` matched each URL; this endpoint’s only validation is that `plugin_namespace` resolves to an installed plugin. Invalid entries are **rejected individually** rather than failing the whole batch, so one bad URL in a pasted list does not block the rest. Check `rejected` in the response. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete a queue item [Section titled “Delete a queue item”](#delete-a-queue-item) DELETEhttp\://localhost:3000/api/download_queue/{id} Removes one item from the queue. An item that is currently downloading is refused with a 409 — deleting its record out from under the running background task would leave that task updating nothing, with no queue row left to show progress and no way to stop the transfer. Stop it first. A queue item that has already been ingested into the library is also refused; remove the resulting archive instead. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update a queue item [Section titled “Update a queue item”](#update-a-queue-item) PATCHhttp\://localhost:3000/api/download_queue/{id} Partial update: a field omitted from the request body keeps its stored value rather than being cleared. Same convention as `PUT /plugins/options`. #### 路径参数 * idstring必填 #### 请求体 Any subset of the item's editable fields. #### 响应 服务器地址http\://localhost:3000 idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/compare` — issue #77’s AI quality-comparison judgment for a [Section titled “POST /download_queue/{id}/compare — issue #77’s AI quality-comparison judgment for a”](#post-download_queueidcompare--issue-77s-ai-quality-comparison-judgment-for-a) POSThttp\://localhost:3000/api/download_queue/{id}/compare Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:1857), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/compare` — issue #77’s AI quality-comparison judgment for a `PendingFilenameConflict`: page-aligns and sharpness-compares the freshly-staged download (`temp_path`, exposed to the response as \[`imgcompare::Side::A`]) against the already-cataloged archive that owns the colliding filename (`existing_id`’s own file, exposed as \[`imgcompare::Side::B`]) — read-only, resolves nothing on its own; the frontend still calls `.../overwrite` or `.../rename` afterward based on what the user (with or without this comparison’s help) decides. `A`/`B` are deliberately not labeled “new”/“old” in the response itself (see \[`lanrurugi_imgcompare::Side`]’s own docs) — this handler is what actually assigns that meaning for this specific caller. Kept alongside the streaming \[`compare_queue_item_stream`] below (not replaced by it) as a plain request/response fallback for any caller that doesn’t want SSE — the frontend’s own `ComparisonResultModal` flow now goes through the stream endpoint instead (see that handler’s own docs for why). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/compare/export-patch` — builds a `.patch.zip` from a user-picked [Section titled “POST /download_queue/{id}/compare/export-patch — builds a .patch.zip from a user-picked”](#post-download_queueidcompareexport-patch--builds-a-patchzip-from-a-user-picked) POSThttp\://localhost:3000/api/download_queue/{id}/compare/export-patch Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:2610), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/compare/export-patch` — builds a `.patch.zip` from a user-picked selection of A’s own unique pages (`ComparisonResult.a_unmatched_pages`, issue #77’s own follow-on design) and returns its raw bytes for download, ready to be dropped next to the target archive on disk as `.patch.zip` (`lanrurugi_scanner::patch`) — this endpoint doesn’t write it there itself (confirmed design: “补丁不需要应用,只要放在漫画目录内” — a user-placed file, not one this server installs unprompted). The target is always B (the existing library archive this conflict is against) — a patch only ever adds A’s own extra pages on top of the version the user is keeping, never the other way around. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/compare/keep-b` — the “keep the existing library archive, discard [Section titled “POST /download_queue/{id}/compare/keep-b — the “keep the existing library archive, discard”](#post-download_queueidcomparekeep-b--the-keep-the-existing-library-archive-discard) POSThttp\://localhost:3000/api/download_queue/{id}/compare/keep-b Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:2719), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/compare/keep-b` — the “keep the existing library archive, discard this download” resolution (issue #77’s own follow-on design). Distinct from every other resolve action in this file: those all catalogue the *staged* file (A) as some archive, either replacing B (`overwrite_queue_item`) or coexisting with it (`rename_queue_item`) — this one catalogues nothing at all. B is already in the library and stays exactly where it is; the only two things that happen are (1) `insertions`, if any, get written straight to B’s own sidecar `.patch.zip` (not just returned for the user to place themselves, unlike \[`export_compare_patch`] — this flow’s own frontend already walked the user through picking insertion points as part of *choosing* to keep B, so there’s no separate “now go place this file” step left for them to do), and (2) the queue item is deleted outright, same as a plain `DELETE /download_queue/{id}` — there’s nothing left for it to track (confirmed design: a patch’s own existence lives on disk next to B, not as a queue-item flag). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /download_queue/{id}/compare/page?side=a|b&index=N` — the actual page image behind one [Section titled “GET /download_queue/{id}/compare/page?side=a|b\&index=N — the actual page image behind one”](#get-download_queueidcomparepagesideabindexn--the-actual-page-image-behind-one) GEThttp\://localhost:3000/api/download_queue/{id}/compare/page Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:2354), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /download_queue/{id}/compare/page?side=a|b&index=N` — the actual page image behind one `PageComparison` sample from `.../compare`’s own response, for the frontend’s overlay/shift-to-toggle comparison view. `side=a` reads from the still-uncatalogued staged download (`temp_path` — no archive ID exists yet, so this can’t reuse `archives.rs`’s own `GET /archives/{id}/page`); `side=b` reads from the existing archive’s own file. `index` is a natural-sort page position (matching `lanrurugi_imgcompare::PageComparison`’s own `a_page_index`/`b_page_index`), resolved to an entry name via `list_pages` fresh on every call rather than cached — this endpoint is only ever hit a handful of times per conflict (issue #77’s own confirmed sample size of 3-5), so re-listing isn’t worth adding a cache for. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /download_queue/{id}/compare/pages?side=a|b` — the real entry-name list for one side of [Section titled “GET /download_queue/{id}/compare/pages?side=a|b — the real entry-name list for one side of”](#get-download_queueidcomparepagessideab--the-real-entry-name-list-for-one-side-of) GEThttp\://localhost:3000/api/download_queue/{id}/compare/pages Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:2482), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /download_queue/{id}/compare/pages?side=a|b` — the real entry-name list for one side of the comparison, in natural-sort (page) order. The frontend’s own “pick where to insert an unmatched A page” UI (issue #77’s own follow-on design) needs B’s real entry names to send as `after_filename`/`before_filename` in `.../export-patch` — it otherwise only ever deals in numeric page indices (matching `PageComparison.a_page_index`/`b_page_index`), which `patch.rs`’s own JSON schema deliberately doesn’t use (see that module’s docs on why an entry name is the stable anchor, not an index that can drift if the archive is re-scanned). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /download_queue/{id}/compare/stream` — the SSE-streaming twin of \[`compare_queue_item`] [Section titled “GET /download_queue/{id}/compare/stream — the SSE-streaming twin of \[compare_queue_item\]”](#get-download_queueidcomparestream--the-sse-streaming-twin-of-compare_queue_item) GEThttp\://localhost:3000/api/download_queue/{id}/compare/stream Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:1988), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /download_queue/{id}/compare/stream` — the SSE-streaming twin of \[`compare_queue_item`] above, per issue #77’s own confirmed two-phase design (see `lanrurugi_imgcompare::compare_archives_streaming`’s own docs for the full phase-1/phase-2 breakdown): opens an `EventSource`-compatible stream (GET, not POST — `EventSource` can’t send a request body or use any other HTTP method) that emits one `event: sample` per `CompareEvent::Sample` (coarse first, precise replacements streamed in afterward) and a single terminal `event: done` carrying the rest of `ComparisonResult`’s own fields — never relies on connection-close/timeout as an implicit end signal (“并且sse要有结束标记”). The frontend opens its result view the moment the FIRST `sample` event arrives rather than waiting for the whole comparison, which for a \~200-page archive pair is otherwise several seconds of dead time (“假设有6对结果(粗加工),可以用sse分6次发,发第一对的时候就开始显示modal,这样是一个很大的提速”). A cache hit (same policy as `compare_queue_item`’s own) is replayed as a single burst of `sample` events (`phase: coarse` for all of them — a cached result has already gone through both phases, and the frontend only cares about “is this a display-final value”, which `Coarse` vs `Precise` doesn’t actually change once the value itself is final) immediately followed by `done`, so re-opening an already-computed comparison is still effectively instant. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/confirm-older` — answers the [Section titled “POST /download_queue/{id}/confirm-older — answers the”](#post-download_queueidconfirm-older--answers-the) POSThttp\://localhost:3000/api/download_queue/{id}/confirm-older Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:707), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/confirm-older` — answers the `AwaitingRevisionConfirmation` prompt raised when a download turned out to be an *older* revision than an archive already in the library (issue #107’s `warn_then_conflict_menu`). `proceed: true` records the decision on the item and restarts it — the restart runs straight through the same version-history check instead of parking again, because `revision_confirmed` is now set. `proceed: false` moves the item to `Cancelled`, which is already the “user stopped this on purpose, still restartable” state, so no new terminal state is needed. Deliberately separate from `.../start`: `AwaitingRevisionConfirmation` is not `is_startable`, so the ordinary Start button can’t skip the question by accident. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/fetch-metadata` — the “Fetch Metadata” button’s backend path [Section titled “POST /download_queue/{id}/fetch-metadata — the “Fetch Metadata” button’s backend path”](#post-download_queueidfetch-metadata--the-fetch-metadata-buttons-backend-path) POSThttp\://localhost:3000/api/download_queue/{id}/fetch-metadata Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:148), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/fetch-metadata` — the “Fetch Metadata” button’s backend path. Runs the same plugin-`execMetadata` + `metadata_preview`-cache logic the post-download auto-fetch uses (`plugins::ensure_metadata_cached`), so a manual preview and the automatic one share one code path (and one 10-min TTL) instead of the frontend calling `POST /plugins/use` itself. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/overwrite` — resolves a `PendingFilenameConflict` by deleting the [Section titled “POST /download_queue/{id}/overwrite — resolves a PendingFilenameConflict by deleting the”](#post-download_queueidoverwrite--resolves-a-pendingfilenameconflict-by-deleting-the) POSThttp\://localhost:3000/api/download_queue/{id}/overwrite Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:1362), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/overwrite` — resolves a `PendingFilenameConflict` by deleting the existing archive (B) and cataloguing the staged download (A) under its originally-intended filename. `body.insertions`, when given, packages B’s own unique pages into a `.patch.zip` for the *new* A archive (issue #77’s own follow-on design: even when A wins overall, some of B’s pages might still be worth keeping) — this has to read B’s pages and resolve B’s own category/tag/progress metadata *before* calling `resolve_conflict`, since that call deletes B’s file and record as part of cataloguing A (`pipeline.rs::delete_existing_archive`) — there’s nothing left to read from afterward. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/rename` — resolves a `PendingFilenameConflict` by cataloguing the [Section titled “POST /download_queue/{id}/rename — resolves a PendingFilenameConflict by cataloguing the”](#post-download_queueidrename--resolves-a-pendingfilenameconflict-by-cataloguing-the) POSThttp\://localhost:3000/api/download_queue/{id}/rename Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:1649), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/rename` — resolves a `PendingFilenameConflict` by cataloguing the staged download under `body.filename` instead, leaving the existing archive that owns the original filename untouched (a fresh, separate, coexisting archive). If `filename` itself also collides with some other archive, the item ends up with a *new* `PendingFilenameConflict` (still resolvable, just against a different existing archive/filename) rather than losing the already-downloaded bytes — see `ingest::resolve_rename`’s own docs. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Start one queue item [Section titled “Start one queue item”](#start-one-queue-item) POSThttp\://localhost:3000/api/download_queue/{id}/start Resolves the item’s own download plugin (chosen when it was added, not now), marks it as starting, and launches the real download in the background. The item’s `state`, `job_id` and `error` stay current as the transfer proceeds. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/{id}/stop` — cancels an in-flight (`Starting`/`Downloading`) item’s [Section titled “POST /download_queue/{id}/stop — cancels an in-flight (Starting/Downloading) item’s”](#post-download_queueidstop--cancels-an-in-flight-startingdownloading-items) POSThttp\://localhost:3000/api/download_queue/{id}/stop Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:1253), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/{id}/stop` — cancels an in-flight (`Starting`/`Downloading`) item’s download and reverts it to `Queued` so it can be restarted. Cooperative, not forceful: this only signals `AppState::download_cancellations`’ token for the item — the background task itself notices at its next `tokio::select!` poll (see `download_manager::stream::download_one`) and does its own partial-file cleanup before actually finishing, at which point `start_download` reverts the queue item’s state (see the `cancel_for_task.is_cancelled()` branch there). No token present means either the item was never actually downloading (nothing to stop) or it already finished on its own just before this request landed — both are `NotRunning`, not an error worth surfacing loudly, since the desired end state (“this item isn’t downloading”) is already true either way. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /download_queue/clear_completed` — deletes every `Done` item, returns the count removed [Section titled “POST /download_queue/clear_completed — deletes every Done item, returns the count removed”](#post-download_queueclear_completed--deletes-every-done-item-returns-the-count-removed) POSThttp\://localhost:3000/api/download_queue/clear_completed Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:3098), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /download_queue/clear_completed` — deletes every `Done` item, returns the count removed. Deliberately excludes `Error` — unlike `Done`, an errored item is a restartable, still- actionable state (grouped with `Queued`/`Cancelled` everywhere else in this module: selectable, has a retry button, shows its own error text), not “completed” work a user is done looking at. A user wanting to discard a specific failed item can still do so individually via `DELETE /download_queue/{id}` (which does clean up a `pending_filename_conflict`’s own staged temp file — `Done` items never carry one, so this handler has nothing analogous to worry about). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete selected queue items [Section titled “Delete selected queue items”](#delete-selected-queue-items) POSThttp\://localhost:3000/api/download_queue/delete_selected Bulk delete by ID, mirroring `start_selected`’s semantics: an ID that is missing or already deleted is a **silent no-op**, not an error, so a stale selection can be passed safely. An ID that is currently downloading is likewise a silent no-op — the same safety rule the single-item delete enforces with a 409. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Start every queued item [Section titled “Start every queued item”](#start-every-queued-item) POSThttp\://localhost:3000/api/download_queue/start_all Starts every item in the `queued` state, concurrently. Each spawns its own background task; per-domain concurrency and rate limiting are enforced downstream by the download manager, so no extra throttling happens here. Deliberately narrower than the single-item start: items in `error` or `cancelled` are retried one at a time on purpose, and an item parked awaiting a version-conflict answer is **never** swept up — bulk-starting it would answer, by omission, the very question it is parked on. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Start selected queue items [Section titled “Start selected queue items”](#start-selected-queue-items) POSThttp\://localhost:3000/api/download_queue/start_selected Like `start_all`, filtered to the IDs given. An ID that is already in flight, already finished, or otherwise not startable is a **silent no-op**, not an error — so a client can pass a selection without re-checking each item’s current state first. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /download_queue/stream` — SSE endpoint that pushes incremental queue-item state changes [Section titled “GET /download_queue/stream — SSE endpoint that pushes incremental queue-item state changes”](#get-download_queuestream--sse-endpoint-that-pushes-incremental-queue-item-state-changes) GEThttp\://localhost:3000/api/download_queue/stream Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/download_queue.rs:75), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /download_queue/stream` — SSE endpoint that pushes incremental queue-item state changes broadcast by `update_queue_item_state` after each successful Redis write. The first event is `full` with the current complete list so the client can bootstrap without a separate HTTP GET. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Duplicate Detection > 3 endpoints. 3 endpoints. ## `DELETE /database/duplicates` — matches legacy’s `?delete=1` param on the same page route [Section titled “DELETE /database/duplicates — matches legacy’s ?delete=1 param on the same page route”](#delete-databaseduplicates--matches-legacys-delete1-param-on-the-same-page-route) DELETEhttp\://localhost:3000/api/database/duplicates Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/duplicates.rs:228), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /database/duplicates` — matches legacy’s `?delete=1` param on the same page route. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Reads every stored group, resolving IDs to current archive metadata and pruning entries that [Section titled “Reads every stored group, resolving IDs to current archive metadata and pruning entries that”](#reads-every-stored-group-resolving-ids-to-current-archive-metadata-and-pruning-entries-that) GEThttp\://localhost:3000/api/database/duplicates Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/duplicates.rs:169), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Reads every stored group, resolving IDs to current archive metadata and pruning entries that have vanished since the scan (deleted archives) — matches legacy’s self-healing behavior in `Controller/Duplicates.pm::index` (drops the whole group if it’d shrink below 2 members, otherwise just removes the vanished ID and rewrites the group). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Queues the scan as a background job (matches legacy’s `/api/minion/find_duplicates/queue` [Section titled “Queues the scan as a background job (matches legacy’s /api/minion/find_duplicates/queue”](#queues-the-scan-as-a-background-job-matches-legacys-apiminionfind_duplicatesqueue) POSThttp\://localhost:3000/api/database/duplicates/scan Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/duplicates.rs:47), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Queues the scan as a background job (matches legacy’s `/api/minion/find_duplicates/queue` being Minion-backed rather than synchronous) since hashing every archive pair is O(n²) and shouldn’t block the request. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Font Patterns > 2 endpoints. 2 endpoints. ## get_font_pattern [Section titled “get_font_pattern”](#get_font_pattern) GEThttp\://localhost:3000/api/volumes/{id}/font-pattern Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_font_pattern` in crates/lanrurugi-api/src/font_pattern.rs:35. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## reset_font_pattern [Section titled “reset_font_pattern”](#reset_font_pattern) POSThttp\://localhost:3000/api/volumes/{id}/font-pattern/reset Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `reset_font_pattern` in crates/lanrurugi-api/src/font_pattern.rs:52. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Health > 1 endpoint. 1 endpoint. ## health [Section titled “health”](#health) GEThttp\://localhost:3000/health Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `health` in crates/lanrurugi-api/src/health.rs:68. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Background Jobs > 3 endpoints. 3 endpoints. ## Clear every finished job [Section titled “Clear every finished job”](#clear-every-finished-job) DELETEhttp\://localhost:3000/api/jobs Removes jobs that have reached a terminal state — `finished` **or** `failed`. Jobs still in flight (`queued`, `active`) are left tracked; use the single-job endpoint once they settle. Only `state=finished` is accepted. The name means “any terminal-state job”, which is why `failed` jobs are swept up too. #### 查询参数 * statestring · enum: finished必填 只接受 `finished`;缺失或传入其他值会返回 400。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• statequeryfinished 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## List tracked background jobs [Section titled “List tracked background jobs”](#list-tracked-background-jobs) GEThttp\://localhost:3000/api/jobs Every job this instance is tracking, most recently created first. Progress and byte counts are best-effort: a job that cannot report granular progress jumps straight from 0 to 1 rather than reporting a fabricated intermediate value, and the byte fields are genuinely absent (not `0`) for jobs that have no transfer to report. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clear one job [Section titled “Clear one job”](#clear-one-job) DELETEhttp\://localhost:3000/api/jobs/{id} Clears a single job by ID, and only once it has reached a terminal state. A job that is still `queued` or `active` is a 409 rather than being silently killed — a job that reports success while its work is still running would be worse than an error. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # AI Usage > Per-feature AI request counts, token usage, time and failures. Per-feature AI request counts, token usage, time and failures. ## usage [Section titled “usage”](#usage) GEThttp\://localhost:3000/api/llm/usage Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `usage` in crates/lanrurugi-api/src/llm_usage.rs:124. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Login > 4 endpoints. 4 endpoints. ## login [Section titled “login”](#login) POSThttp\://localhost:3000/api/login Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `login` in crates/lanrurugi-api/src/login.rs:236. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /login/status` — reports whether the caller is “logged in” for the purposes of gating [Section titled “GET /login/status — reports whether the caller is “logged in” for the purposes of gating”](#get-loginstatus--reports-whether-the-caller-is-logged-in-for-the-purposes-of-gating) GEThttp\://localhost:3000/api/login/status Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/login.rs:669), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /login/status` — reports whether the caller is “logged in” for the purposes of gating admin-only UI, matching legacy’s own `userlogged` template variable (`Controller/Reader.pm`/`Index.pm`: `enable_pass == 0 || session('is_logged')`). Deliberately its own endpoint rather than a new field on `/info` — `/info` mirrors legacy’s third-party `ServerInfo` OpenAPI schema field-for-field (constitution Principle II), and `logged_in` has no place in that contract. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Now that refresh tokens are stateful (`lanrurugi_storage::refresh_tokens`), logout actually [Section titled “Now that refresh tokens are stateful (lanrurugi_storage::refresh_tokens), logout actually”](#now-that-refresh-tokens-are-stateful-lanrurugi_storagerefresh_tokens-logout-actually) POSThttp\://localhost:3000/api/logout Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/login.rs:751), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Now that refresh tokens are stateful (`lanrurugi_storage::refresh_tokens`), logout actually revokes — burns the entire refresh-token family the caller’s access token was minted from (same remediation `rotate`’s own reuse-detection path takes), not just clearing the browser’s cookies and hoping the now-orphaned access token quietly expires on its own within the next few hours. Reads `fid` out of the *access* token (`session::COOKIE_NAME`, `Path=/`), not the refresh cookie — deliberately, so `REFRESH_COOKIE_PATH` can stay scoped to only `POST /api/token/refresh` without also needing to cover this endpoint. Uses `family_id_ignoring_expiry` rather than the normal expiry-checking verifier: a user who clicks “log out” after their access token has already expired (idle tab, hasn’t hit any endpoint that would have triggered a silent refresh yet) must still get their refresh-token family actually revoked — an already-expired access token still proves genuine origin via its signature, which is all this needs. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /token/refresh` — no legacy equivalent [Section titled “POST /token/refresh — no legacy equivalent”](#post-tokenrefresh--no-legacy-equivalent) POSThttp\://localhost:3000/api/token/refresh Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/login.rs:404), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /token/refresh` — no legacy equivalent. Redeems the refresh cookie for a fresh access token + rotated refresh cookie (see `lanrurugi_storage::refresh_tokens::rotate`’s own docs for the rotation/reuse-detection semantics). The frontend calls this transparently on a 401 from any other endpoint (`apps/frontend/src/api/client.ts`), before ever redirecting to `/login`. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Logs > 1 endpoint. 1 endpoint. ## get_log_lines [Section titled “get_log_lines”](#get_log_lines) GEThttp\://localhost:3000/api/logs/{category} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_log_lines` in crates/lanrurugi-api/src/logs.rs:26. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Minion API > 3 endpoints. 3 endpoints. ## Get the basic status of a Minion Job [Section titled “Get the basic status of a Minion Job”](#get-the-basic-status-of-a-minion-job) GEThttp\://localhost:3000/api/minion/{jobid} For a given Minion job ID, check whether it succeeded or failed.\ Minion jobs are ran for various occasions like thumbnails, cache warmup and handling incoming files.\ For some jobs, you can check the notes field for progress information. Look at for more information. #### 路径参数 * jobidinteger必填 要查询状态的任务 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• jobidpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get the full status of a Minion Job [Section titled “Get the full status of a Minion Job”](#get-the-full-status-of-a-minion-job) GEThttp\://localhost:3000/api/minion/{jobid}/detail Get the status of a Minion Job.\ This API is there for internal usage mostly, but you can use it to get detailed status for jobs like plugin runs or URL downloads. #### 路径参数 * jobidinteger必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• jobidpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Queue a Minion job [Section titled “Queue a Minion job”](#queue-a-minion-job) POSThttp\://localhost:3000/api/minion/{jobname}/queue Queue a Job with the specified type and parameters.\ See LANraragi::Utils::Minion for all the available types of jobs and the parameters they require. There’s no API contract in place for whether a Job type exists on a given server version, so I wouldn’t recommend using this unless you have a good reason to. #### 路径参数 * jobnamestring · enum: thumbnail_task | tank_thumbnail_task | page_thumbnails | regen_all_thumbnails | find_duplicates | build_stat_hashes | handle_upload | download_url | run_plugin必填 要实例化的任务类型。 #### 查询参数 * argsstring必填 参数,以 JSON 数组字符串给出 * priorityinteger · default: 0可选 Minion 任务的优先级。数字越大越优先。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• jobnamepaththumbnail_taskargsquerypriorityquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Miscellaneous other API > 5 endpoints. 5 endpoints. ## Queue a URL download [Section titled “Queue a URL download”](#queue-a-url-download) POSThttp\://localhost:3000/api/download_url Add a URL to be downloaded by the server and added to its library. #### 查询参数 * urlstring可选 要下载的 URL * catidstring · min: 14 · max: 14 · pattern可选 把下载到的 URL 加入的分类 ID。 #### 请求体 multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• urlquerycatidquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get server info [Section titled “Get server info”](#get-server-info) GEThttp\://localhost:3000/api/info Returns some basic information about the LRR instance this server is running. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /api/llm/key-status` — returns `{ configured: true/false }` [Section titled “GET /api/llm/key-status — returns { configured: true/false }”](#get-apillmkey-status--returns--configured-truefalse-) GEThttp\://localhost:3000/api/llm/key-status Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/misc.rs:118), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /api/llm/key-status` — returns `{ configured: true/false }`. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Regenerate Thumbnails [Section titled “Regenerate Thumbnails”](#regenerate-thumbnails) POSThttp\://localhost:3000/api/regen_thumbs Queue a Minion job to regenerate missing/all thumbnails on the server. #### 查询参数 * forceboolean可选 是生成全部缩略图,还是只生成缺失的那些。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• forcequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clean the Temporary Folder [Section titled “Clean the Temporary Folder”](#clean-the-temporary-folder) DELETEhttp\://localhost:3000/api/tempfolder Cleans the server’s temporary folder. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # OPDS Catalog > 3 endpoints. 3 endpoints. ## Get the OPDS Catalog [Section titled “Get the OPDS Catalog”](#get-the-opds-catalog) GEThttp\://localhost:3000/api/opds Get the Archive Index as an OPDS 1.2 Catalog with PSE 1.1 compatibility. #### 查询参数 * categorystring可选 分类 ID。传入后,OPDS 目录会被过滤为只显示该分类下的档案。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• categoryquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get a specific archive through OPDS [Section titled “Get a specific archive through OPDS”](#get-a-specific-archive-through-opds) GEThttp\://localhost:3000/api/opds/{id} Returns a specific OPDS item as XML. This will show only one \ for the given ID in the result, instead of all the archives. #### 路径参数 * idstring必填 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## OPDS-PSE [Section titled “OPDS-PSE”](#opds-pse) GEThttp\://localhost:3000/api/opds/{id}/pse Returns a specific image page for OPDS-PSE as XML. #### 路径参数 * idstring必填 #### 查询参数 * pageinteger可选 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # OpenSearch > 1 endpoint. 1 endpoint. ## opensearch_xml [Section titled “opensearch_xml”](#opensearch_xml) GEThttp\://localhost:3000/opensearch.xml Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `opensearch_xml` in crates/lanrurugi-api/src/opensearch.rs:74. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Plugin Wizard > 7 endpoints. 7 endpoints. ## analyze_login [Section titled “analyze_login”](#analyze_login) POSThttp\://localhost:3000/api/plugin-wizard/analyze-login Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `analyze_login` in crates/lanrurugi-api/src/plugin_wizard/analyze_login.rs:55. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /plugin-wizard/generate/{id}/record` — the whole read surface; no UI [Section titled “GET /plugin-wizard/generate/{id}/record — the whole read surface; no UI”](#get-plugin-wizardgenerateidrecord--the-whole-read-surface-no-ui) GEThttp\://localhost:3000/api/plugin-wizard/generate/{id}/record Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugin_wizard/record.rs:118), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /plugin-wizard/generate/{id}/record` — the whole read surface; no UI. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /plugin-wizard/generate/start` — see this module’s own top-level docs for why generation [Section titled “POST /plugin-wizard/generate/start — see this module’s own top-level docs for why generation”](#post-plugin-wizardgeneratestart--see-this-modules-own-top-level-docs-for-why-generation) POSThttp\://localhost:3000/api/plugin-wizard/generate/start Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugin_wizard/generate.rs:193), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /plugin-wizard/generate/start` — see this module’s own top-level docs for why generation is split into this plus `generate_stream` rather than one `POST` returning JSON. Accepts the request body as a raw \[`serde_json::Value`] (not a typed `GenerateRequest`) specifically so this endpoint never has to duplicate `GenerateRequest`’s own field/default handling — the real typed parse happens once, at `generate_stream` time, against whatever was stashed here unmodified. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /plugin-wizard/generate/stream/{id}` — the real `EventSource`-compatible streaming [Section titled “GET /plugin-wizard/generate/stream/{id} — the real EventSource-compatible streaming”](#get-plugin-wizardgeneratestreamid--the-real-eventsource-compatible-streaming) GEThttp\://localhost:3000/api/plugin-wizard/generate/stream/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugin_wizard/generate.rs:211), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /plugin-wizard/generate/stream/{id}` — the real `EventSource`-compatible streaming endpoint; see this module’s own top-level docs for the full event sequence. `id` is single-use (removed from `pending_generate_requests` the moment this is called), so replaying the same id (a stale bookmark, a double-click race) always yields `generation_not_found` rather than silently re-running an old request. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## lookup [Section titled “lookup”](#lookup) POSThttp\://localhost:3000/api/plugin-wizard/lookup Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `lookup` in crates/lanrurugi-api/src/plugin_wizard/mod.rs:22. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## save [Section titled “save”](#save) POSThttp\://localhost:3000/api/plugin-wizard/save Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `save` in crates/lanrurugi-api/src/plugin_wizard/save.rs:71. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## trial_run [Section titled “trial_run”](#trial_run) POSThttp\://localhost:3000/api/plugin-wizard/trial-run Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `trial_run` in crates/lanrurugi-api/src/plugin_wizard/trial_run.rs:148. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Plugin API > 12 endpoints. 12 endpoints. ## List available plugins [Section titled “List available plugins”](#list-available-plugins) GEThttp\://localhost:3000/api/plugins/{type} List all plugins of the given type. #### 路径参数 * typestring · enum: download | login | metadata | script | all必填 要列出的插件类型。传 "all" 可以一次取回所有类型。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• typepathdownload 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /plugins/export?namespace=...` (`specs/006-ai-plugin-wizard` FR-028) — downloads an [Section titled “GET /plugins/export?namespace=... (specs/006-ai-plugin-wizard FR-028) — downloads an”](#get-pluginsexportnamespace-specs006-ai-plugin-wizard-fr-028--downloads-an) GEThttp\://localhost:3000/api/plugins/export Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:1038), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /plugins/export?namespace=...` (`specs/006-ai-plugin-wizard` FR-028) — downloads an installed plugin (wizard-created or not) as a `.zip` containing its own `.ts` file, named after the namespace’s own last path component (e.g. `custom/metadata/foo` → `foo.zip` containing `foo.ts`) rather than the full namespace, since the namespace’s `/`-separated category prefix isn’t meaningful once extracted standalone. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /plugins/export-batch` — like \[`export_plugin`] but for several namespaces at once, [Section titled “POST /plugins/export-batch — like \[export_plugin\] but for several namespaces at once,”](#post-pluginsexport-batch--like-export_plugin-but-for-several-namespaces-at-once) POSThttp\://localhost:3000/api/plugins/export-batch Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:1109), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /plugins/export-batch` — like \[`export_plugin`] but for several namespaces at once, packed into a single `.zip`. Each entry is stored under its full namespace path (`custom/ download/foo.ts`, not just `foo.ts`) since two different namespaces can share the same file stem (`custom/download/foo` vs `custom/metadata/foo`) — collapsing both to `foo.ts` would silently drop one on zip write. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## delete_plugin_options [Section titled “delete_plugin_options”](#delete_plugin_options) DELETEhttp\://localhost:3000/api/plugins/options Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `delete_plugin_options` in crates/lanrurugi-api/src/plugins.rs:931. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## get_plugin_options [Section titled “get_plugin_options”](#get_plugin_options) GEThttp\://localhost:3000/api/plugins/options Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_plugin_options` in crates/lanrurugi-api/src/plugins.rs:785. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## put_plugin_options [Section titled “put_plugin_options”](#put_plugin_options) PUThttp\://localhost:3000/api/plugins/options Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `put_plugin_options` in crates/lanrurugi-api/src/plugins.rs:854. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `PUT /plugins/priority` — persists a drag-and-drop reorder of one plugin `type` group’s display [Section titled “PUT /plugins/priority — persists a drag-and-drop reorder of one plugin type group’s display”](#put-pluginspriority--persists-a-drag-and-drop-reorder-of-one-plugin-type-groups-display) POSThttp\://localhost:3000/api/plugins/priority Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:567), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `PUT /plugins/priority` — persists a drag-and-drop reorder of one plugin `type` group’s display order (additive, no legacy equivalent: legacy’s `plugins.html.tt2` has no such affordance at all). Rewrites every listed namespace’s `priority` field in its own `LRR_PLUGIN_` hash (same storage as `customargs`/`enabled`) to its position in `order`, so a subsequent `GET /plugins/{type}` sorts accordingly. A namespace whose actual type doesn’t match `body.type` is skipped (not written, not erroring the whole request) — see `PutPluginPriorityBody::kind`’s own docs for why this check exists at all. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Use a Plugin Asynchronously [Section titled “Use a Plugin Asynchronously”](#use-a-plugin-asynchronously) POSThttp\://localhost:3000/api/plugins/queue Uses a Plugin and returns a Minion Job ID matching the Plugin run. This endpoint is useful if you want to run longer-lived plugins which might timeout if ran with the standard endpoint. #### 查询参数 * idstring · min: 40 · max: 40 · pattern可选 要在其上执行插件的档案 ID。只有元数据插件才必须提供。 * priorityinteger · default: 0可选 Minion 任务的优先级。数字越大越优先。 * pluginstring可选 要使用的插件命名空间。 * argstring可选 执行该插件时可选的 One-Shot 参数。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idquerypriorityquerypluginqueryargquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /plugins/settings?namespace=...` — the plugin’s currently persisted `customargs` (padded/ [Section titled “GET /plugins/settings?namespace=... — the plugin’s currently persisted customargs (padded/”](#get-pluginssettingsnamespace--the-plugins-currently-persisted-customargs-padded) GEThttp\://localhost:3000/api/plugins/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:461), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /plugins/settings?namespace=...` — the plugin’s currently persisted `customargs` (padded/ truncated to exactly its own declared `parameters.len()` — a stale saved array longer/shorter than the plugin’s current declaration, e.g. after the plugin was upgraded to add/remove a parameter, is silently reconciled to the current shape rather than surfaced as a mismatch, matching legacy’s own default-value-fill-then-overwrite behavior in `get_plugin_parameters`) and `enabled` (legacy’s “Run Automatically” toggle — `is_plugin_enabled`, `false` when never set, same as legacy’s own `hexists`-gated default). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## put_plugin_settings [Section titled “put_plugin_settings”](#put_plugin_settings) PUThttp\://localhost:3000/api/plugins/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `put_plugin_settings` in crates/lanrurugi-api/src/plugins.rs:497. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## upload_plugin [Section titled “upload_plugin”](#upload_plugin) POSThttp\://localhost:3000/api/plugins/upload Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `upload_plugin` in crates/lanrurugi-api/src/plugins.rs:3924. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Use a Plugin [Section titled “Use a Plugin”](#use-a-plugin) POSThttp\://localhost:3000/api/plugins/use Uses a Plugin and returns the result. If using a metadata plugin, the matching archive will not be modified in the database. See more info on Plugins in the matching section of the Docs. #### 查询参数 * idstring · min: 40 · max: 40 · pattern可选 要在其上执行插件的档案 ID。只有元数据插件才必须提供。 * pluginstring可选 要使用的插件命名空间。 * argstring可选 执行该插件时可选的 One-Shot 参数。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idquerypluginqueryargquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Preferences > 2 endpoints. 2 endpoints. ## Read the caller’s preferences [Section titled “Read the caller’s preferences”](#read-the-callers-preferences) GEThttp\://localhost:3000/api/preferences The caller’s own library-view preferences, falling back to the defaults for any value that has never been set. An unauthenticated caller gets the defaults — not another user’s settings. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update the caller’s preferences [Section titled “Update the caller’s preferences”](#update-the-callers-preferences) PUThttp\://localhost:3000/api/preferences Stores the caller’s library-view preferences. Fields omitted from the request are left as they are. Requires an authenticated caller; an unauthenticated one is refused rather than silently writing to a shared bucket. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Recommendations > 1 endpoint. 1 endpoint. ## get_recommendations [Section titled “get_recommendations”](#get_recommendations) GEThttp\://localhost:3000/api/reader/recommendations/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_recommendations` in crates/lanrurugi-api/src/recommend.rs:438. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Maintenance Scripts > 3 endpoints. 3 endpoints. ## `POST /database/scripts/repair-mojibake` — see `crate::mojibake`’s own docs for why stored [Section titled “POST /database/scripts/repair-mojibake — see crate::mojibake’s own docs for why stored”](#post-databasescriptsrepair-mojibake--see-cratemojibakes-own-docs-for-why-stored) POSThttp\://localhost:3000/api/database/scripts/repair-mojibake Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:61), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /database/scripts/repair-mojibake` — see `crate::mojibake`’s own docs for why stored records can still hold doubly-encoded text long after the importer learned to repair it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /database/scripts/subfolders-to-categories` — scans the archive folder and creates one [Section titled “POST /database/scripts/subfolders-to-categories — scans the archive folder and creates one”](#post-databasescriptssubfolders-to-categories--scans-the-archive-folder-and-creates-one) POSThttp\://localhost:3000/api/database/scripts/subfolders-to-categories Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:182), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /database/scripts/subfolders-to-categories` — scans the archive folder and creates one static Category per subfolder that directly contains archives (`FolderToCat.pm::run_script`). Reports its own wall-clock `elapsed_ms` in the response (directory walk through category creation, inclusive) so it can be directly compared against `plugins/script/foldertocat.ts` — a real `.ts` script plugin doing the identical directory walk + grouping logic itself (via `Deno.readDir`, not host-injected paths — the user wanted a genuine head-to-head, not a contrived one where the plugin is handed pre-walked data), used to gauge the real overhead of running this kind of I/O-heavy whole-library scan through the Deno-subprocess plugin sandbox versus native Rust. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /database/scripts/subfolders-to-tankoubons` — scans only the **first-level subfolders** [Section titled “POST /database/scripts/subfolders-to-tankoubons — scans only the first-level subfolders”](#post-databasescriptssubfolders-to-tankoubons--scans-only-the-first-level-subfolders) POSThttp\://localhost:3000/api/database/scripts/subfolders-to-tankoubons Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:494), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /database/scripts/subfolders-to-tankoubons` — scans only the **first-level subfolders** of the archive folder and creates one Tankoubon per such subfolder. All archives under that first-level subdirectory (including archives in deeper nested subdirectories) are added to the same Tankoubon; nested subdirectories do not create their own Tankoubons. Duplicate names are allowed; this is a non-destructive action and never deletes or deduplicates existing Tankoubons. When a DeepSeek API key is configured, the endpoint best-effort uses the LLM to infer a better Tankoubon name and an `artist:`/`circle:` author tag. Without a key, or when the LLM call fails, it falls back to the raw folder name and skips the author tag. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Search API > Perform searches against the archive index. Perform searches against the archive index. ## Search Archives [Section titled “Search Archives”](#search-archives) GEThttp\://localhost:3000/api/search Search for Archives. You can use the IDs of this JSON with the other endpoints. 权限差异 * 访客(开启访客访问时的未认证访问者)只能看到所属分类被标记为「访客可见」的档案;其他身份能看到整个书库。 #### 查询参数 * categorystring · min: 14 · max: 14 · pattern可选 限定本次搜索范围的分类 ID。 * filterstring可选 搜索查询串。可以在这当中使用下列特殊字符: **双引号 ("...")** 精确字符串搜索。让一个搜索词可以包含空格;一对双引号内的所有内容会被当成单个词条处理。通配符仍然按通配符解释。 **问号 (?)、下划线 (\_)** 通配符,匹配任意单个字符。 **星号 (\*)、百分号 (%)** 通配符,匹配任意长度的字符序列(也可以一个都不匹配)。 **减号 (-)** 排除。放在某个词前面,搜索结果就不会包含该词。 **美元符号 ($)** 加在标签末尾,对该标签做精确搜索,而不是显示所有以该词开头的结果。它只匹配标签,不受搜索参数影响,因此也可以当作排除项,用来在搜索里忽略杂项标签。 * startinteger可选 从结果总数中的第几个档案开始枚举。单页显示的档案数取决于服务端的每页条数偏好。 从 0.8.2 起,这里传 "-1" 可以取到完整的、不分页的数据。 * sortbystring可选 结果排序所依据的命名空间。可用的排序键有: - \*title\*:按标题排序 - \*lastread\*:按上次阅读时间排序(需开启 **服务端进度跟踪** ) (默认值是 title。按 lastread 排序时,从未读过的 ID 会被从搜索结果里移除。) * orderstring可选 排序方向,`asc` 或 `desc`。 * newonlyboolean可选 只搜索未读过的档案。 * untaggedonlyboolean可选 只搜索未打标签的档案。 * hidecompletedboolean可选 隐藏已读到末尾的档案。 * groupby_tanksboolean · default: true可选 启用或关闭 Tankoubon 分组,默认开启。 开启时,搜索结果里会显示 Tankoubon,取代它包含的所有档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• categoryqueryfilterquerystartquerysortbyqueryorderquerynewonlyqueryuntaggedonlyqueryhidecompletedquerygroupby_tanksquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Additive raw-archive search endpoint (`GET /search/archives`), sharing `/search`’s query [Section titled “Additive raw-archive search endpoint (GET /search/archives), sharing /search’s query”](#additive-raw-archive-search-endpoint-get-searcharchives-sharing-searchs-query) GEThttp\://localhost:3000/api/search/archives Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/search.rs:435), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Additive raw-archive search endpoint (`GET /search/archives`), sharing `/search`’s query syntax, filtering, sorting, and pagination but never folding member archives behind a Tankoubon. It is intentionally a separate endpoint rather than a new default on `/search`: existing grouped-search callers keep their exact behavior, while duplicate/library-membership checks can ask for the underlying archive records instead of a `TANK_` aggregate. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Discard Search Cache [Section titled “Discard Search Cache”](#discard-search-cache) DELETEhttp\://localhost:3000/api/search/cache Discard the cache containing previous user searches. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Forget one entry [Section titled “Forget one entry”](#forget-one-entry) DELETEhttp\://localhost:3000/api/search/history What the search panel’s `Delete` key calls on a highlighted history row. Removes every occurrence, so a hand-edited list cannot leave a row the reader cannot dismiss. #### 查询参数 * filterstring必填 The exact history entry to forget. #### 响应 服务器地址http\://localhost:3000API 令牌••••• filterquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## The account’s recent searches [Section titled “The account’s recent searches”](#the-accounts-recent-searches) GEThttp\://localhost:3000/api/search/history Newest first, at most 8 entries (the cap the browser-side version kept). With `filter`, only the entries related to it, judged with the engine’s own folding, so `くろ` still offers a stored `クロガネ`; without it, the whole history. A caller with no account (e.g. a read-only token) gets an empty list; guests are denied by the route policy. #### 查询参数 * filterstring可选 What the reader is typing; limits the answer to the related entries. #### 响应 服务器地址http\://localhost:3000API 令牌••••• filterquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Remember one applied filter [Section titled “Remember one applied filter”](#remember-one-applied-filter) POSThttp\://localhost:3000/api/search/history Moves the entry to the front, removing any previous occurrence and trimming to the cap, in one atomic pipeline. Called only for a genuinely applied filter. #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Search Archive IDs [Section titled “Search Archive IDs”](#search-archive-ids) GEThttp\://localhost:3000/api/search/ids Search for Archives like `/api/search`, but returns only the ordered list of matching Archive IDs without the accompanying metadata. 权限差异 * 作用域与 `/api/search` 相同:访客只会拿到访客可见档案的 ID。 #### 查询参数 * categorystring · min: 14 · max: 14 · pattern可选 限定本次搜索范围的分类 ID。 * filterstring可选 搜索查询串,规则与 `/api/search` 相同。 * startinteger可选 从结果总数中的第几个档案开始枚举。单页显示的档案数取决于服务端的每页条数偏好。 从 0.8.2 起,这里传 "-1" 可以取到完整的、不分页的 ID 列表。 * sortbystring可选 结果排序所依据的命名空间。可用的排序键有: - \*title\*:按标题排序 - \*lastread\*:按上次阅读时间排序(需开启 **服务端进度跟踪** ) (默认值是 title。按 lastread 排序时,从未读过的 ID 会被从搜索结果里移除。) * orderstring可选 排序方向,`asc` 或 `desc`。 * newonlyboolean可选 只搜索未读过的档案。 * untaggedonlyboolean可选 只搜索未打标签的档案。 * hidecompletedboolean可选 隐藏已读到末尾的档案。 * groupby_tanksboolean · default: true可选 启用或关闭 Tankoubon 分组,默认开启。 开启时,搜索结果里会显示 Tankoubon,取代它包含的所有档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• categoryqueryfilterquerystartquerysortbyqueryorderquerynewonlyqueryuntaggedonlyqueryhidecompletedquerygroupby_tanksquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Search random Archives [Section titled “Search random Archives”](#search-random-archives) GEThttp\://localhost:3000/api/search/random Get randomly selected Archives from the given filter and/or category. 权限差异 * 作用域与 `/api/search` 相同:访客只会在访客可见的档案中随机抽取。 #### 查询参数 * categorystring · min: 14 · max: 14 · pattern可选 限定本次搜索范围的分类 ID。 * filterstring可选 搜索查询串,规则与 `/api/search` 相同。 * countinteger · default: 5可选 要随机取多少个档案,默认 5。 如果搜索结果的条数不够你要的数量,就返回全部搜索结果打乱后的结果。 * newonlyboolean可选 只搜索未读过的档案。 * untaggedonlyboolean可选 只搜索未打标签的档案。 * hidecompletedboolean可选 隐藏已读到末尾的档案。 * groupby_tanksboolean · default: true可选 启用或关闭 Tankoubon 分组,默认开启。 开启时,搜索结果里会显示 Tankoubon,取代它包含的所有档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• categoryqueryfilterquerycountquerynewonlyqueryuntaggedonlyqueryhidecompletedquerygroupby_tanksquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Additive, lightweight endpoint backing the Library search box’s title autocomplete [Section titled “Additive, lightweight endpoint backing the Library search box’s title autocomplete”](#additive-lightweight-endpoint-backing-the-library-search-boxs-title-autocomplete) GEThttp\://localhost:3000/api/search/suggest Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/search.rs:603), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Additive, lightweight endpoint backing the Library search box’s title autocomplete. Unlike `/search`, it returns only `arcid` + `title` for the first few matches — no tags, progress, or size — because the frontend calls it on every (debounced) keystroke, where a full `/search` page of 100 archive records would be a few hundred KB of JSON that a suggestion list immediately discards. Same query syntax, same filters, and the same default `title` ordering as `/search` (which is exactly what a suggestion list wants), plus the same guest scoping: `restrict_to_archive_ids` is applied here too, so a `guest_visitor` can never be shown an out-of-scope title through this endpoint that `/search` would refuse to return. 权限差异 * 作用域与 `/api/search` 相同,因此访客不可能看到 `/api/search` 会拒绝返回的档案标题。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Signed-in Devices > 3 endpoints. 3 endpoints. ## List signed-in devices [Section titled “List signed-in devices”](#list-signed-in-devices) GEThttp\://localhost:3000/api/sessions Every active refresh-token family — that is, every device currently signed in — including the one making this request, which is marked so a client does not offer to revoke itself by accident. Requires a session-cookie login. An API token of either role is rejected. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Revoke a signed-in device [Section titled “Revoke a signed-in device”](#revoke-a-signed-in-device) DELETEhttp\://localhost:3000/api/sessions/{family_id} Ends one session by revoking its whole refresh-token family, so the device must sign in again. Requires a session-cookie login. #### 路径参数 * family_idstring必填 #### 响应 服务器地址http\://localhost:3000 family_idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Rename a signed-in device [Section titled “Rename a signed-in device”](#rename-a-signed-in-device) PATCHhttp\://localhost:3000/api/sessions/{family_id} Sets a custom display name for one session, so a device list reads as “living room tablet” rather than as a user-agent string. Requires a session-cookie login. #### 路径参数 * family_idstring必填 #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000 family_idpath 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Settings > 4 endpoints. 4 endpoints. ## get_settings [Section titled “get_settings”](#get_settings) GEThttp\://localhost:3000/api/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_settings` in crates/lanrurugi-api/src/settings.rs:628. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## put_settings [Section titled “put_settings”](#put_settings) PUThttp\://localhost:3000/api/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `put_settings` in crates/lanrurugi-api/src/settings.rs:755. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Sets a new admin password, hashed the same way legacy stores one (`{CRYPT}$2a$...` — see [Section titled “Sets a new admin password, hashed the same way legacy stores one ({CRYPT}$2a$... — see”](#sets-a-new-admin-password-hashed-the-same-way-legacy-stores-one-crypt2a--see) POSThttp\://localhost:3000/api/settings/password Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/settings.rs:1021), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Sets a new admin password, hashed the same way legacy stores one (`{CRYPT}$2a$...` — see `lanrurugi_core::password`) so a legacy instance sharing this Redis keeps accepting it too. An empty string clears password protection’s practical effect the same way legacy’s own config-page “leave blank to keep current password” convention does *not* work here — this endpoint always sets whatever was submitted, so the frontend must not submit an empty field unless the user explicitly means to set an empty password. #### 响应 服务器地址http\://localhost:3000 该端点**只接受网页会话**(登录本站所用实例后浏览器自动携带的 cookie)。API 令牌会被服务端拒绝,因此这里不提供令牌输入框,上面的命令行也不带 Authorization 头。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## issue #92: this response also carries `language` now, not just `theme` — `useApplyTheme`/ [Section titled “issue #92: this response also carries language now, not just theme — useApplyTheme/”](#issue-92-this-response-also-carries-language-now-not-just-theme--useapplytheme) GEThttp\://localhost:3000/api/theme Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/settings.rs:160), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** issue #92: this response also carries `language` now, not just `theme` — `useApplyTheme`/ `useApplySettingsLanguage` (`apps/frontend/src/theme.ts`/`i18n/index.ts`) both used to read their respective field off the full, auth-gated `GET /settings` (which 401s pre-login, since that response also carries the API key and other genuinely secret fields that can’t be made public) — every page rendered before a session exists (the Login page’s own bespoke `usePublicTheme` fallback aside) hit that 401, and the *global* 401 handler in `client.ts` force-navigates to `/login` on every single one regardless of whether the calling hook itself already had a fallback ready, defeating issue #92’s own “stay on the page, don’t redirect” requirement for anything rendered while logged out (the new 404 page very much included — live-reported as a real double-navigation: the 404 content flashes, then `/login` anyway). `theme`/`language` are the only two fields anything needs before a session exists, and neither is remotely secret, so folding `language` into this already-public endpoint is simpler than standing up a whole second public settings surface for one more field. The response also carries `admin_theme` — always the administrator’s own `theme`, regardless of guest-eligibility — so the Login page can render with the admin theme even when guest mode is on and the guest theme is a different one. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Shinobu API > 4 endpoints. 4 endpoints. ## Get Shinobu status [Section titled “Get Shinobu status”](#get-shinobu-status) GEThttp\://localhost:3000/api/shinobu Get the current status of the FileWatcher. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Rescan filemap and restart Shinobu [Section titled “Rescan filemap and restart Shinobu”](#rescan-filemap-and-restart-shinobu) POSThttp\://localhost:3000/api/shinobu/rescan This deletes the internal map of scanned files on your system (the “filemap”) and restarts Shinobu, effectively prompting a full rescan of your FS. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Restart Shinobu [Section titled “Restart Shinobu”](#restart-shinobu) POSThttp\://localhost:3000/api/shinobu/restart Restart the Shinobu filewatcher #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Stop Shinobu [Section titled “Stop Shinobu”](#stop-shinobu) POSThttp\://localhost:3000/api/shinobu/stop Stops the Filewatcher. Use `/api/shinobu/restart` to start it again. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Stamps API > 8 endpoints. 8 endpoints. ## Get pages that contain at least one stamp in the archive [Section titled “Get pages that contain at least one stamp in the archive”](#get-pages-that-contain-at-least-one-stamp-in-the-archive) GEThttp\://localhost:3000/api/archives/{id}/stamps Get pages that contain at least one stamp in the archive. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring必填 档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get the stamps linked to the page [Section titled “Get the stamps linked to the page”](#get-the-stamps-linked-to-the-page) GEThttp\://localhost:3000/api/archives/{id}/stamps/{index} Get the stamps linked to the page. 权限差异 * 对**不在访客可见范围内**的档案,这里返回 **404** 而不是 403——刻意与「档案不存在」不可区分,因此这个响应无法被用来探测访客范围之外的档案是否存在。 #### 路径参数 * idstring必填 档案 ID。 * indexinteger必填 档案的页码。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathindexpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Add a stamp annotation [Section titled “Add a stamp annotation”](#add-a-stamp-annotation) PUThttp\://localhost:3000/api/archives/{id}/stamps/{index} Add a new Stamp to the page at the given coordinates. #### 路径参数 * idstring必填 档案 ID。 * indexinteger必填 档案的页码。 #### 查询参数 * contentstring可选 图章文本。 * positionstring可选 图章在页面中的位置。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathindexpathcontentquerypositionquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete Stamp [Section titled “Delete Stamp”](#delete-stamp) DELETEhttp\://localhost:3000/api/stamps/{id} Remove a stamp from an Archive. #### 路径参数 * idstring必填 图章 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get Stamp [Section titled “Get Stamp”](#get-stamp) GEThttp\://localhost:3000/api/stamps/{id} Get a stamp from an Archive. #### 路径参数 * idstring必填 图章 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update Stamp [Section titled “Update Stamp”](#update-stamp) PUThttp\://localhost:3000/api/stamps/{id} Update a stamp from an Archive. #### 路径参数 * idstring必填 图章 ID。 #### 查询参数 * contentstring可选 图章文本。 * positionstring可选 图章在页面中的位置。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathcontentquerypositionquery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## tank_stamps_by_page [Section titled “tank_stamps_by_page”](#tank_stamps_by_page) GEThttp\://localhost:3000/api/tankoubons/{id}/stamps/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `tank_stamps_by_page` in crates/lanrurugi-api/src/stamps.rs:58. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## tank_add_stamp [Section titled “tank_add_stamp”](#tank_add_stamp) PUThttp\://localhost:3000/api/tankoubons/{id}/stamps/{page} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `tank_add_stamp` in crates/lanrurugi-api/src/stamps.rs:72. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Library Statistics > 3 endpoints. 3 endpoints. ## The archives behind one bar of one chart [Section titled “The archives behind one bar of one chart”](#the-archives-behind-one-bar-of-one-chart) GEThttp\://localhost:3000/api/stats/bucket A drill-down: given one bucket of one `/stats` chart, the archives in it, for the list the page shows under the chart. Fetched per click rather than folded into `/stats/overview`, which is a whole-library snapshot that would have to carry every bucket’s archive list to support this. Deliberately not expressed as a search query, even though some of these buckets have one: “last read on day X” has no search operator at all, and the progress ladder’s `unread` rung means “never *opened*” (its own `is_read`) while the search’s `read:`/`is:unread` filters key on the `progress` field alone — so they disagree about an archive that was opened without a page turn. Deriving the list from the same classification the chart used is what keeps the list and the bar consistent by construction. Requesting this as a guest is scoped to what that guest may see, matching `/stats/overview`. #### 查询参数 * metricstring · enum: ingest | read | size | rating | progress必填 `ingest`/`read` are time buckets and need `from`+`to`; `size`/`rating`/`progress` are keyed buckets and need `key`. * fromstring可选 `ingest`/`read` only. First day of the bucket, `YYYY-MM-DD`, inclusive. The client sends the span it actually drew rather than a unit+key pair, so no bucket-key-to-span arithmetic has to exist in two languages. * tostring可选 `ingest`/`read` only. Last day of the bucket, `YYYY-MM-DD`, inclusive. * keystring可选 `size` bucket key (`lt_1mb` … `gte_500mb`), a `rating` of `0`-`5` (where `0` is the unrated-or-zero slot, exactly as the chart's own distribution counts it), or a `progress` ladder key (`unread`, `1_20`, `21_40`, `41_60`, `61_80`, `81_99`, `finished`). #### 响应 服务器地址http\://localhost:3000API 令牌••••• metricqueryingestfromquerytoquerykeyquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Aggregated library statistics [Section titled “Aggregated library statistics”](#aggregated-library-statistics) GEThttp\://localhost:3000/api/stats/overview One snapshot covering: headline totals, archive size distribution, container format/MIME breakdown, ingestion history (by month, by ingestion path, and the newest arrivals), reading history (per-day, progress distribution, ratings, and the most recently/most often read works), and a weighted reading-preference analysis over tags, authors and categories. Requesting this as a guest yields counts and breakdowns restricted to what that guest may actually see, matching `/database/stats`’s own scoping. Weighted preference values are relative rankings, not probabilities or percentages: they are only ever meaningful against each other within one response. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## One metric’s daily time series [Section titled “One metric’s daily time series”](#one-metrics-daily-time-series) GEThttp\://localhost:3000/api/stats/timeline The page’s time-series source, kept separate from `/stats/overview` because it is driven interactively: the overview is one expensive snapshot (its preference analysis runs a search per dynamic category), while this endpoint is refetched per range change and re-bucketed entirely client-side. The series is **always daily**, whatever granularity the reader is looking at, so that changing granularity — or zooming and panning — needs no request at all once the range has been fetched once. A request wider than the server’s own cap is clamped to the *newest* days of it, and `available_from` still reports where the data really begins. Requesting this as a guest is scoped to what that guest may see, matching `/stats/overview`. #### 查询参数 * metricstring · enum: ingest | reading必填 `ingest` counts archives added per day (from each archive's own `date_added` tag); `reading` reports page turns and archives-last-read per day. * frominteger可选 Unix seconds. Defaults to the whole available range — which is what the page asks for, so every later zoom is local. Clamped to the library's own data. * tointeger可选 Unix seconds; defaults to now, and is never later than it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• metricqueryingestfromquerytoquery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Subscriptions > 25 endpoints. 25 endpoints. ## list_reservations [Section titled “list_reservations”](#list_reservations) GEThttp\://localhost:3000/api/reservations Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `list_reservations` in crates/lanrurugi-api/src/subscriptions/api.rs:1007. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## discard_reservation [Section titled “discard_reservation”](#discard_reservation) POSThttp\://localhost:3000/api/reservations/{id}/discard Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `discard_reservation` in crates/lanrurugi-api/src/subscriptions/api.rs:1027. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## list [Section titled “list”](#list) GEThttp\://localhost:3000/api/subscriptions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `list` in crates/lanrurugi-api/src/subscriptions/api.rs:172. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## create [Section titled “create”](#create) POSThttp\://localhost:3000/api/subscriptions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `create` in crates/lanrurugi-api/src/subscriptions/api.rs:249. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## remove [Section titled “remove”](#remove) DELETEhttp\://localhost:3000/api/subscriptions/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `remove` in crates/lanrurugi-api/src/subscriptions/api.rs:352. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## detail [Section titled “detail”](#detail) GEThttp\://localhost:3000/api/subscriptions/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `detail` in crates/lanrurugi-api/src/subscriptions/api.rs:292. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## update [Section titled “update”](#update) PUThttp\://localhost:3000/api/subscriptions/{id} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `update` in crates/lanrurugi-api/src/subscriptions/api.rs:311. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## The user’s own “no”: these works are never downloaded by this subscription again [Section titled “The user’s own “no”: these works are never downloaded by this subscription again”](#the-users-own-no-these-works-are-never-downloaded-by-this-subscription-again) POSThttp\://localhost:3000/api/subscriptions/{id}/block Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:644), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** The user’s own “no”: these works are never downloaded by this subscription again. Distinct from a rule rejection on purpose — a rule reads a value that can change, so a rejection is provisional and decided afresh every cycle (FR-011i), while this is an answer, and re-deciding it would ask again what the user already said. The preview offers it per row; `forget_seen` undoes it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Runs a real check now rather than waiting for the schedule (FR-024) [Section titled “Runs a real check now rather than waiting for the schedule (FR-024)”](#runs-a-real-check-now-rather-than-waiting-for-the-schedule-fr-024) POSThttp\://localhost:3000/api/subscriptions/{id}/check Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:846), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Runs a real check now rather than waiting for the schedule (FR-024). Spawned rather than awaited: a check contacts the source and may page through it, which is longer than a request should hold open. The result shows up in the subscription’s own history. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## disable [Section titled “disable”](#disable) POSThttp\://localhost:3000/api/subscriptions/{id}/disable Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `disable` in crates/lanrurugi-api/src/subscriptions/api.rs:388. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## enable [Section titled “enable”](#enable) POSThttp\://localhost:3000/api/subscriptions/{id}/enable Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `enable` in crates/lanrurugi-api/src/subscriptions/api.rs:378. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Makes a subscription reconsider works it has already handled [Section titled “Makes a subscription reconsider works it has already handled”](#makes-a-subscription-reconsider-works-it-has-already-handled) POSThttp\://localhost:3000/api/subscriptions/{id}/forget Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:597), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Makes a subscription reconsider works it has already handled. Being seen is otherwise permanent, which is correct for the ordinary case — a work the user deleted on purpose must not come back on the next check. But two situations need it undone: a deletion made by mistake, and a rule that has since been widened (works rejected under the old rule were recorded as seen at the moment they were rejected, so nothing would reconsider them). With `sources`, forgets exactly those. With `all: true`, clears the set — kept as a separate, explicit request because on a long-running subscription it can match the entire back catalogue at once, which is a different order of consequence. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## What a check would do, without doing it [Section titled “What a check would do, without doing it”](#what-a-check-would-do-without-doing-it) POSThttp\://localhost:3000/api/subscriptions/{id}/preview Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:803), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** What a check would do, without doing it. Deliberately works on a **disabled** subscription: “what would this rule actually catch” is asked precisely while tuning one that is switched off. Nothing is queued, recorded as seen, or logged, so it is safe to run repeatedly — the only cost is one request to the source. Accepts an optional body carrying an unsaved subscription, so a rule can be previewed before it is committed. Without that, a user would have to save a rule to find out what it does. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Clears a system-applied pause [Section titled “Clears a system-applied pause”](#clears-a-system-applied-pause) POSThttp\://localhost:3000/api/subscriptions/{id}/resume Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:400), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Clears a system-applied pause. Distinct from `enable`, because a paused subscription was stopped *by the system* and owes the user an explanation — resuming is the user answering it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Every work the user has explicitly blocked, newest first, across all subscriptions [Section titled “Every work the user has explicitly blocked, newest first, across all subscriptions”](#every-work-the-user-has-explicitly-blocked-newest-first-across-all-subscriptions) GEThttp\://localhost:3000/api/subscriptions/blocked Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:417), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Every work the user has explicitly blocked, newest first, across all subscriptions. Its own endpoint rather than a filter over the history: a block is an *answer* — the user said no to this work — and the history is a log of decisions that keeps being rewritten by later cycles (a work queued and then catalogued reads `already_held` in every record). Only the block list stays exactly as the user left it, which is what makes it worth showing on its own and undoing from there. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## generate [Section titled “generate”](#generate) POSThttp\://localhost:3000/api/subscriptions/condition/ai Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `generate` in crates/lanrurugi-api/src/subscriptions/ai_condition.rs:301. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## parse [Section titled “parse”](#parse) POSThttp\://localhost:3000/api/subscriptions/condition/parse Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `parse` in crates/lanrurugi-api/src/subscriptions/ai_condition.rs:284. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Every subscription’s recent candidates, newest first, as one stream [Section titled “Every subscription’s recent candidates, newest first, as one stream”](#every-subscriptions-recent-candidates-newest-first-as-one-stream) GEThttp\://localhost:3000/api/subscriptions/history Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:450), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Every subscription’s recent candidates, newest first, as one stream. Per-subscription history already exists, but it answers “what did *this* rule do” — the question actually asked is usually the other one: what has arrived lately, and why did something expected not. That needs the subscriptions interleaved rather than read one at a time. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Matched works waiting for the user’s go-ahead [Section titled “Matched works waiting for the user’s go-ahead”](#matched-works-waiting-for-the-users-go-ahead) GEThttp\://localhost:3000/api/subscriptions/pending Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:859), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Matched works waiting for the user’s go-ahead. Only reachable because `auto_download` defaults off — without this, that default would leave candidates recorded but unanswerable. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Approving is the moment unattended matching becomes attended spending — nothing before this point [Section titled “Approving is the moment unattended matching becomes attended spending — nothing before this point”](#approving-is-the-moment-unattended-matching-becomes-attended-spending--nothing-before-this-point) POSThttp\://localhost:3000/api/subscriptions/pending/approve Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:892), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Approving is the moment unattended matching becomes attended spending — nothing before this point consumes download credit. Partial success is reported rather than rolled back: with several items, one that fails to queue is no reason to un-approve the rest, and the caller is told exactly which ones did not make it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Dismissing marks each work seen, so later checks do not raise the same question again [Section titled “Dismissing marks each work seen, so later checks do not raise the same question again”](#dismissing-marks-each-work-seen-so-later-checks-do-not-raise-the-same-question-again) POSThttp\://localhost:3000/api/subscriptions/pending/dismiss Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:980), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Dismissing marks each work seen, so later checks do not raise the same question again. This is the user answering “no” — distinct from a reservation, which is the system reporting it *could* not download something. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Previews a subscription that does not exist yet [Section titled “Previews a subscription that does not exist yet”](#previews-a-subscription-that-does-not-exist-yet) POSThttp\://localhost:3000/api/subscriptions/preview Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:744), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Previews a subscription that does not exist yet. The id-bearing route cannot serve this: there is no record to read. Yet a subscription being created is exactly when “what would this actually catch” matters most — afterwards the user has already committed to the rule. The draft is evaluated against the source as it is now, and nothing is stored either way. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Re-judges a listing already fetched, against possibly-different conditions [Section titled “Re-judges a listing already fetched, against possibly-different conditions”](#re-judges-a-listing-already-fetched-against-possibly-different-conditions) POSThttp\://localhost:3000/api/subscriptions/preview/judge Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:684), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Re-judges a listing already fetched, against possibly-different conditions. Changing a condition changes nothing about what the source would return — only `criteria` shapes the request — so re-fetching would be wasted, slow, and one more hit on a source that rate-limits. The judgment still happens here rather than in the browser, because a second implementation of the condition tree would eventually disagree with the real one. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Which sources can back a subscription, with their interval bounds — so the UI can offer only [Section titled “Which sources can back a subscription, with their interval bounds — so the UI can offer only”](#which-sources-can-back-a-subscription-with-their-interval-bounds--so-the-ui-can-offer-only) GEThttp\://localhost:3000/api/subscriptions/sources Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:186), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Which sources can back a subscription, with their interval bounds — so the UI can offer only viable sources and show the bounds *before* the user submits, rather than teaching them the rules through a rejection. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Which subscriptions have already handled a given work, by its source URL [Section titled “Which subscriptions have already handled a given work, by its source URL”](#which-subscriptions-have-already-handled-a-given-work-by-its-source-url) GEThttp\://localhost:3000/api/subscriptions/tracking Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/subscriptions/api.rs:555), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Which subscriptions have already handled a given work, by its source URL. Asked before deleting an archive, so the delete flow only offers “stop this coming back” for an archive a subscription actually brought in — offering it for a hand-uploaded file would be an option with no effect, which is worse than no option at all. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Tankoubon Grouping > 8 endpoints. 8 endpoints. ## ai_group_suggestions [Section titled “ai_group_suggestions”](#ai_group_suggestions) POSThttp\://localhost:3000/api/tankoubons/ai-group-suggestions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `ai_group_suggestions` in crates/lanrurugi-api/src/tankoubon_grouping.rs:775. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `DELETE /tankoubons/ai-group-suggestions/ignore` — re-enables a previously-ignored suggestion [Section titled “DELETE /tankoubons/ai-group-suggestions/ignore — re-enables a previously-ignored suggestion”](#delete-tankoubonsai-group-suggestionsignore--re-enables-a-previously-ignored-suggestion) DELETEhttp\://localhost:3000/api/tankoubons/ai-group-suggestions/ignore Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping.rs:1259), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /tankoubons/ai-group-suggestions/ignore` — re-enables a previously-ignored suggestion (the frontend’s “Show ignored combinations” checklist’s own “Un-ignore” button). Idempotent — un-ignoring a combination that isn’t currently ignored is a no-op, not an error. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /tankoubons/ai-group-suggestions/ignore` — “Don’t suggest this again” for one specific [Section titled “POST /tankoubons/ai-group-suggestions/ignore — “Don’t suggest this again” for one specific”](#post-tankoubonsai-group-suggestionsignore--dont-suggest-this-again-for-one-specific) POSThttp\://localhost:3000/api/tankoubons/ai-group-suggestions/ignore Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping.rs:1216), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /tankoubons/ai-group-suggestions/ignore` — “Don’t suggest this again” for one specific suggestion. Idempotent (ignoring an already-ignored combination just overwrites its `ignored_at` timestamp, per `IgnoredGroupSuggestionsRepository::ignore`’s own contract). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /tankoubons/ai-group-suggestions/ignored` — backs the “Show ignored combinations” [Section titled “GET /tankoubons/ai-group-suggestions/ignored — backs the “Show ignored combinations””](#get-tankoubonsai-group-suggestionsignored--backs-the-show-ignored-combinations) GEThttp\://localhost:3000/api/tankoubons/ai-group-suggestions/ignored Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping.rs:1281), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /tankoubons/ai-group-suggestions/ignored` — backs the “Show ignored combinations” checklist itself (titles are resolved client-side against the already-loaded archive list, the same `titleById` map `AiSmartTankoubonModal.tsx` already builds for the main suggestion cards — this endpoint only needs to return the raw ignored entries, not hydrate them server-side). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `DELETE /tankoubons/ai-group-suggestions/labels` (FR-017) [Section titled “DELETE /tankoubons/ai-group-suggestions/labels (FR-017)”](#delete-tankoubonsai-group-suggestionslabels-fr-017) DELETEhttp\://localhost:3000/api/tankoubons/ai-group-suggestions/labels Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping/labels.rs:197), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `DELETE /tankoubons/ai-group-suggestions/labels` (FR-017). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `GET /tankoubons/ai-group-suggestions/labels` [Section titled “GET /tankoubons/ai-group-suggestions/labels”](#get-tankoubonsai-group-suggestionslabels) GEThttp\://localhost:3000/api/tankoubons/ai-group-suggestions/labels Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping/labels.rs:185), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `GET /tankoubons/ai-group-suggestions/labels`. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /tankoubons/ai-group-suggestions/labels` [Section titled “POST /tankoubons/ai-group-suggestions/labels”](#post-tankoubonsai-group-suggestionslabels) POSThttp\://localhost:3000/api/tankoubons/ai-group-suggestions/labels Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping/labels.rs:128), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /tankoubons/ai-group-suggestions/labels`. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## `POST /tankoubons/ai-group-suggestions/review` — never an HTTP error for a review failure: the [Section titled “POST /tankoubons/ai-group-suggestions/review — never an HTTP error for a review failure: the”](#post-tankoubonsai-group-suggestionsreview--never-an-http-error-for-a-review-failure-the) POSThttp\://localhost:3000/api/tankoubons/ai-group-suggestions/review Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubon_grouping/review\.rs:489), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** `POST /tankoubons/ai-group-suggestions/review` — never an HTTP error for a review failure: the card always renders, with the local result when the review could not be had. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Tankoubon API > 13 endpoints. 13 endpoints. ## Get all Tankoubons [Section titled “Get all Tankoubons”](#get-all-tankoubons) GEThttp\://localhost:3000/api/tankoubons Get list of Tankoubons paginated. #### 查询参数 * pageinteger可选 Tankoubon 列表的页码。 每页数量取决于服务端的 `archives_per_page` 设置。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• pagequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Create a Tankoubon [Section titled “Create a Tankoubon”](#create-a-tankoubon) PUThttp\://localhost:3000/api/tankoubons Create a new Tankoubon or update the name of an existing one. #### 请求体 application/x-www-form-urlencoded, multipart/form-data #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Delete Tankoubon [Section titled “Delete Tankoubon”](#delete-tankoubon) DELETEhttp\://localhost:3000/api/tankoubons/{id} Remove a Tankoubon from the server. This doesn’t delete underlying Archives. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get a single Tankoubon [Section titled “Get a single Tankoubon”](#get-a-single-tankoubon) GEThttp\://localhost:3000/api/tankoubons/{id} Get the details of the specified tankoubon ID. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update Tankoubon metadata/contents [Section titled “Update Tankoubon metadata/contents”](#update-tankoubon-metadatacontents) PUThttp\://localhost:3000/api/tankoubons/{id} Modify the full metadata (name, summary, additional tags) or the contents of a Tankoubon.\ If you only need to change the name of Tank, consider just using PUT `/api/tankoubons`. Note: If there is no need to update something in one of the `data` keys, do not send the key – This otherwise can result in unwanted results. #### 路径参数 * idstring · min: 15 · max: 15 · pattern必填 要更新的 Tankoubon ID。 #### 请求体 application/json #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Remove an Archive from a Tankoubon [Section titled “Remove an Archive from a Tankoubon”](#remove-an-archive-from-a-tankoubon) DELETEhttp\://localhost:3000/api/tankoubons/{id}/{archive} #### 路径参数 * idstring · min: 15 · max: 15 · pattern必填 要更新的 Tankoubon ID。 * archivestring · min: 40 · max: 40 · pattern必填 要移除的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpatharchivepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Add an Archive to a Tankoubon [Section titled “Add an Archive to a Tankoubon”](#add-an-archive-to-a-tankoubon) PUThttp\://localhost:3000/api/tankoubons/{id}/{archive} Append an archive at the final position of a Tankoubon. #### 路径参数 * idstring · min: 15 · max: 15 · pattern必填 要更新的 Tankoubon ID。 * archivestring · min: 40 · max: 40 · pattern必填 要追加的档案 ID。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpatharchivepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## ai_rename_chapter [Section titled “ai_rename_chapter”](#ai_rename_chapter) POSThttp\://localhost:3000/api/tankoubons/{id}/ai/rename-chapter Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `ai_rename_chapter` in crates/lanrurugi-api/src/tankoubons.rs:1714. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## POST /api/tankoubons/{id}/ai/rename-suggestions [Section titled “POST /api/tankoubons/{id}/ai/rename-suggestions”](#post-apitankoubonsidairename-suggestions) POSThttp\://localhost:3000/api/tankoubons/{id}/ai/rename-suggestions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/tankoubons.rs:1588), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** POST /api/tankoubons/{id}/ai/rename-suggestions Sends the tankoubon title, member archive names, and order to DeepSeek and returns AI-generated rename suggestions (tankoubon name + per-archive chapter names). The LLM key must be configured; returns 400 if not. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get a single Tankoubon with full detail [Section titled “Get a single Tankoubon with full detail”](#get-a-single-tankoubon-with-full-detail) GEThttp\://localhost:3000/api/tankoubons/{id}/full Get the details of the specified tankoubon ID with paginated archive metadata. The amount of archives per page depends on the server `archives_per_page` setting. #### 查询参数 * pageinteger · default: -1可选 档案列表的页码。默认 -1,返回全部档案。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• pagequery 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update Tankoubon reading progression [Section titled “Update Tankoubon reading progression”](#update-tankoubon-reading-progression) PUThttp\://localhost:3000/api/tankoubons/{id}/progress/{page} Tell the server which page of this Tankoubon you’re currently reading, so that it updates its internal reading progression accordingly. The page number is global across all Archives in the tank (If a tank has two Archives with 20 and 25 pages, page 26 will be page 6 in Archive #2). ⚠ If the server is configured to use clientside progress tracking, this API call will return an error! Make sure to check using `/api/info` whether the server tracks reading progression or not before calling this endpoint. #### 路径参数 * idstring · min: 15 · max: 15 · pattern必填 要更新的 Tankoubon ID。 * pageinteger · min: 1必填 要更新到的全局页码,从 1 开始计数。必须是正整数。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• idpathpagepath 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Get Tankoubon thumbnail [Section titled “Get Tankoubon thumbnail”](#get-tankoubon-thumbnail) GEThttp\://localhost:3000/api/tankoubons/{id}/thumbnail Get the cover thumbnail for a given Tankoubon. By default, the thumbnail is sourced from the first page of the first archive. This endpoint will return a placeholder image if it doesn’t already exist. If you want to queue generation of the thumbnail in the background, you can use the no_fallback query parameter. #### 查询参数 * no_fallbackstring · enum: true | false可选 关闭占位图,把缩略图排入提取队列,并返回 code 202 的 JSON。图片已存在时该参数不起作用。(无论哪种情况,只要图片已存在就会以 code 200 返回它) #### 响应 服务器地址http\://localhost:3000API 令牌••••• no_fallbackquerytrue 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Update Tankoubon thumbnail [Section titled “Update Tankoubon thumbnail”](#update-tankoubon-thumbnail) PUThttp\://localhost:3000/api/tankoubons/{id}/thumbnail Set the cover thumbnail for the given Tankoubon using a global page number that spans all archives in the tank (in order). The global page is translated to the correct archive and local page automatically. #### 查询参数 * pageinteger · min: 1必填 跨整个 Tankoubon 内所有档案的全局页码,从 1 开始计数。第 1 页就是第一个档案的第一页,依此类推。 #### 响应 服务器地址http\://localhost:3000API 令牌••••• pagequery 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Terminology Glossary > 3 endpoints. 3 endpoints. ## get_glossary [Section titled “get_glossary”](#get_glossary) GEThttp\://localhost:3000/api/volumes/{id}/terminology-glossary Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_glossary` in crates/lanrurugi-api/src/terminology_glossary.rs:38. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## delete_entry [Section titled “delete_entry”](#delete_entry) DELETEhttp\://localhost:3000/api/volumes/{id}/terminology-glossary/{term} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `delete_entry` in crates/lanrurugi-api/src/terminology_glossary.rs:139. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Edits a single entry [Section titled “Edits a single entry”](#edits-a-single-entry) PUThttp\://localhost:3000/api/volumes/{id}/terminology-glossary/{term} Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/terminology_glossary.rs:59), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Edits a single entry. Takes effect on the next translation request (FR-007d). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Page Translation > 6 endpoints. 6 endpoints. ## Detection output plus everything the browser needs to translate and composite locally [Section titled “Detection output plus everything the browser needs to translate and composite locally”](#detection-output-plus-everything-the-browser-needs-to-translate-and-composite-locally) GEThttp\://localhost:3000/api/archives/{id}/page/{page}/text-regions Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:406), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Detection output plus everything the browser needs to translate and composite locally. Includes the same `context` the cloud path assembles, so a locally-hosted backend gets FR-007a–e’s consistency benefit even though its translation call never touches this server. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Reader’s “重新翻译”: drops this page’s detection cache, every translated record and the [Section titled “Reader’s “重新翻译”: drops this page’s detection cache, every translated record and the”](#readers-重新翻译-drops-this-pages-detection-cache-every-translated-record-and-the) DELETEhttp\://localhost:3000/api/archives/{id}/page/{page}/translation Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:203), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Reader’s “重新翻译”: drops this page’s detection cache, every translated record and the rendered image, so the next `GET .../translation` re-runs the whole OCR -> translate -> composite pipeline instead of reusing a stale cache (e.g. one produced by an old pipeline version, or a partially-detected region set). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Serves the composited, translated page for the cloud-backend path (T028) [Section titled “Serves the composited, translated page for the cloud-backend path (T028)”](#serves-the-composited-translated-page-for-the-cloud-backend-path-t028) GEThttp\://localhost:3000/api/archives/{id}/page/{page}/translation Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:275), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Serves the composited, translated page for the cloud-backend path (T028). Returns the cached rendering when one exists. On a miss it **triggers** the real orchestration — OCR → font routing → batched translation → compositing → cache write (`translation_pipeline::translate_page`) — for this page and its look-ahead window, then reports not-ready immediately. The work is deliberately not awaited here: a full OCR + LLM cycle takes tens of seconds, and FR-012 requires the reader to keep showing the original page with a non-blocking indicator meanwhile. The client polls; a later poll finds the cache entry this triggered. Reading must never wait on translation (SC-007). #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Records a translation the browser obtained from its own local model (T049a) [Section titled “Records a translation the browser obtained from its own local model (T049a)”](#records-a-translation-the-browser-obtained-from-its-own-local-model-t049a) POSThttp\://localhost:3000/api/archives/{id}/page/{page}/translation/record Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:591), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Records a translation the browser obtained from its own local model (T049a). **No LLM call happens here** — this is a lightweight write. Its purpose is that a name/term the local backend translated still reaches the shared, server-stored glossary, so later cloud-path (or other-device) requests for the same volume stay consistent with it. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Reports whether translation is on for this archive, and whether that’s this archive’s own [Section titled “Reports whether translation is on for this archive, and whether that’s this archive’s own”](#reports-whether-translation-is-on-for-this-archive-and-whether-thats-this-archives-own) GEThttp\://localhost:3000/api/archives/{id}/translation/scope Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:118), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Reports whether translation is on for this archive, and whether that’s this archive’s own setting or inherited from a Tankoubon it belongs to — the latter so the reader can tell the user “this follows the whole book’s setting” rather than presenting it as if toggling here only ever affects this one file. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Sets the switch for whichever scope actually governs this archive right now (its Tankoubon if [Section titled “Sets the switch for whichever scope actually governs this archive right now (its Tankoubon if”](#sets-the-switch-for-whichever-scope-actually-governs-this-archive-right-now-its-tankoubon-if) PUThttp\://localhost:3000/api/archives/{id}/translation/scope Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation.rs:144), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Sets the switch for whichever scope actually governs this archive right now (its Tankoubon if it has one, else the archive itself) — see `TranslationScopeRepository::set_enabled`’s own docs for why toggling here only ever targets one or the other, never both. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Translation Settings > 4 endpoints. 4 endpoints. ## update_budget [Section titled “update_budget”](#update_budget) PUThttp\://localhost:3000/api/translation/budget Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `update_budget` in crates/lanrurugi-api/src/translation_settings.rs:335. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## get_translation_settings [Section titled “get_translation_settings”](#get_translation_settings) GEThttp\://localhost:3000/api/translation/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_translation_settings` in crates/lanrurugi-api/src/translation_settings.rs:118. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## update_translation_settings [Section titled “update_translation_settings”](#update_translation_settings) PUThttp\://localhost:3000/api/translation/settings Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `update_translation_settings` in crates/lanrurugi-api/src/translation_settings.rs:172. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 该端点需要**管理员**令牌:访客(只读)令牌会被服务端拒绝。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 ## Current consumption at the four granularities FR-014 requires [Section titled “Current consumption at the four granularities FR-014 requires”](#current-consumption-at-the-four-granularities-fr-014-requires) GEThttp\://localhost:3000/api/translation/usage Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/translation_settings.rs:277), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers. *** Current consumption at the four granularities FR-014 requires. Returns a zeroed result rather than an error when no metered backend is configured — a locally-hosted backend simply has no usage to report. #### 响应 服务器地址http\://localhost:3000API 令牌••••• 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。 # Version > 1 endpoint. 1 endpoint. ## get_version [Section titled “get_version”](#get_version) GEThttp\://localhost:3000/api/version Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet. The handler is `get_version` in crates/lanrurugi-api/src/version.rs:528. #### 响应 服务器地址http\://localhost:3000 该端点不需要认证。 发送复制为 cURL **请求失败** — 常见原因:实例地址填错或不可达;实例未开启「为客户端 API 启用 CORS」;或者文档站是 HTTPS 而实例是局域网内的纯 HTTP(浏览器按混合内容拦截)。可以用上面的「复制为 cURL」在终端里发同样的请求。 ``` ``` 填写你自己的实例地址,请求由浏览器直接发往该地址。