---
title: "音源健康度"
method: GET
path: "/plugins/health"
tags: ["JS插件管理"]
---

# 音源健康度

`GET /plugins/health`

返回各音乐源插件的下载成功率、健康度分类(green/yellow/red)与最近 5 条失败原因。

## Response `200`

OK

- HandlersPluginHealthResponse
  - `plugins` SourcePluginHealthSnapshot[]
    - `class` 'green' | 'yellow' | 'red'
    - `last_failures` SourceOutcome[] — 最近 N 次失败,便于排查
      - `latency_ns` integer — 纳秒;swagger 显式声明避免 time.Duration 解析失败
      - `plugin_entry_path` string
      - `reason` string
      - `result` 'success' | 'network_fail' | 'probe_fail' | 'validation_fail' | 'plugin_invocation_fail'
      - `size_bytes` integer
      - `timestamp` string
    - `plugin_entry_path` string
    - `samples` integer
    - `success_rate` number

---

[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/77467de6ed1b/schema)
