---
title: "刷新插件注册表"
method: POST
path: "/jsplugins/registry/refresh"
tags: ["JS插件管理"]
---

# 刷新插件注册表

`POST /jsplugins/registry/refresh`

拉取订阅源（含递归 includes），去重合并后返回分页的可用插件列表。每个插件标注是否已安装及是否有更新。默认拉取单个 registry_url，可选传入 token 字段访问需要认证的私有源（如 GitHub 私有仓库 PAT）。当 all_sources=true 时忽略 registry_url/token，改为聚合已保存的所有启用订阅源（各源用自身存储的 token），跨源按 entry_path 去重、高版本优先。

## Request body

- HandlersRegistryRefreshRequest
  - `all_sources` boolean
  - `github_proxy` string
  - `page` integer
  - `page_size` integer
  - `registry_url` string
  - `search` string
  - `token` string

## Response `200`

插件列表

- HandlersRegistryRefreshResponse
  - `page` integer
  - `page_size` integer
  - `plugins` HandlersRegistryPluginEntry[]
    - `author` string
    - `description` string
    - `download_url` string
    - `entry_path` string
    - `has_update` boolean
    - `homepage` string
    - `icon` string
    - `installed` boolean
    - `installed_version` string
    - `name` string
    - `source_url` string — SourceURL 该插件所属订阅源 URL（仅「全部」聚合模式返回）， 安装时回传给后端以按源解析私有源 token。
    - `version` string
  - `total` integer
  - `warnings` string[]

## Other responses

- `400` — 请求格式错误
- `500` — 拉取注册表失败

---

[API](https://skmtc.dev/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.dev/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc.dev/songloft-org/apis/songloft-api/revisions/7cbe0940a38b?raw)
