---
title: "批量更新所有 JS 插件"
method: POST
path: "/jsplugins/update-all"
tags: ["JS插件管理"]
---

# 批量更新所有 JS 插件

`POST /jsplugins/update-all`

检查并更新所有具有远程更新源的 JS 插件。跳过无 update_url 的插件和已是最新版的插件，逐个下载并安装更新，失败不中断其他插件的更新流程。设置 force=true 可跳过版本检查强制重新下载安装所有插件。

## Request body

- object

## Response `200`

批量更新结果

- HandlersJsPluginBatchUpdateResponse
  - `failed` integer
  - `message` string
  - `results` HandlersJsPluginBatchUpdateResult[]
    - `current_version` string
    - `entry_path` string
    - `error` string
    - `has_update` boolean
    - `new_version` string
    - `plugin_id` integer
    - `plugin_name` string
    - `success` boolean
  - `skipped` integer
  - `total` integer
  - `updated` integer

## Other responses

- `500` — 服务器错误

---

[API](https://skmtc.net/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.net/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/songloft-org/songloft-api/versions/ee41778dbf8f/schema)
