跳转到内容

其他 API

5 endpoints.

POSThttp://localhost:3000/api/download_url

添加一个 URL,交由服务端下载并加入其书库。

查询参数

urlstring可选
要下载的 URL
catidstring · min: 14 · max: 14 · pattern可选
把下载到的 URL 加入的分类 ID。

请求体

multipart/form-data

响应

200已入队的任务
{
  "job": 86,
  "operation": "download_url",
  "success": 1,
  "url": "https://example.com"
}
400请求有误
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

该端点需要管理员令牌:访客(只读)令牌会被服务端拒绝。

填写你自己的实例地址,请求由浏览器直接发往该地址。

GEThttp://localhost:3000/api/info

返回这个服务端所运行的 LRR 实例的一些基本信息。

响应

200服务端信息
{
  "archives_per_page": 100,
  "authenticated_progress": false,
  "cache_last_cleared": 1728852701,
  "debug_mode": true,
  "excluded_namespaces": [
    "source",
    "date_added"
  ],
  "has_password": false,
  "motd": "aye lads time to read some manga",
  "name": "LANraragi",
  "nofun_mode": false,
  "restart_required": false,
  "server_resizes_images": false,
  "server_tracks_progress": true,
  "total_archives": 104,
  "total_pages_read": 252,
  "version": "0.9.30",
  "version_desc": "I'm under Japanese influence and my honor's at stake!",
  "version_name": "Law (Earthlings On Fire)"
}

该端点不需要认证。

填写你自己的实例地址,请求由浏览器直接发往该地址。

查询是否已配置 LLM 密钥(GET /api/llm/key-status,返回 { configured: true/false })

Section titled “查询是否已配置 LLM 密钥(GET /api/llm/key-status,返回 { configured: true/false })”
GEThttp://localhost:3000/api/llm/key-status

尚未在此参考中描述。这个端点会被列出,是因为服务端确实注册了它,但它的请求与响应形状还没有写下来。

下面这段是 handler 自己的文档注释(crates/lanrurugi-api/src/misc.rs:115)的译文;原文以源码为准。

GET /api/llm/key-status——返回 { configured: true/false }。

响应

200该端点已响应;其确切结构尚未记录,见 crates/lanrurugi-api/src/misc.rs:20 处的 handler。

该响应没有示例数据。

填写你自己的实例地址,请求由浏览器直接发往该地址。

POSThttp://localhost:3000/api/regen_thumbs

排入一个 Minion 任务,在服务端重新生成缺失的/全部的缩略图。

查询参数

forceboolean可选
是生成全部缩略图,还是只生成缺失的那些。

响应

200已入队的任务
{
  "job": 3,
  "operation": "regen_thumbnails",
  "success": 1
}

该端点需要管理员令牌:访客(只读)令牌会被服务端拒绝。

填写你自己的实例地址,请求由浏览器直接发往该地址。

DELETEhttp://localhost:3000/api/tempfolder

清理服务端的临时目录。

响应

200清理结果
{
  "error": null,
  "newsize": 0,
  "operation": "cleantemp",
  "success": 1
}

该端点需要管理员令牌:访客(只读)令牌会被服务端拒绝。

填写你自己的实例地址,请求由浏览器直接发往该地址。