> ## Documentation Index
> Fetch the complete documentation index at: https://yumebox.yumeyuka.moe/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取所有规则集合

> 获取所有规则集合的所有信息.



## OpenAPI

````yaml /api/openapi.json get /providers/rules
openapi: 3.1.0
info:
  title: Mihomo 外部控制器 API
  version: 1.1.0
  description: >-
    Mihomo（clash.meta）内核通过外部控制器（external-controller）暴露的 RESTful
    API，可用于查询状态、切换节点、测试延迟、管理连接与 provider 等.TCP / TLS 外部控制器在配置了 secret 时需要携带
    Authorization: Bearer ${secret}；Unix socket / Windows named pipe 访问不会校验
    secret.鉴权与路径以 MetaCubeX mihomo hub/route 实现为准；可在右侧 Try it 面板中修改 host/port（示例
    external-controller: 0.0.0.0:9093）.
servers:
  - url: http://{host}:{port}
    variables:
      host:
        default: 127.0.0.1
        description: 外部控制器监听地址 / mihomo 后端的局域网 IP.
      port:
        default: '9093'
        description: '外部控制器监听端口；默认值对齐 mihomo 示例配置 external-controller: 0.0.0.0:9093.'
security:
  - bearerAuth: []
tags:
  - name: 日志
    description: 实时日志流.
  - name: 流量信息
    description: 实时上下行流量统计.
  - name: 内存信息
    description: 实时内存占用统计.
  - name: 版本信息
    description: 内核版本信息.
  - name: 缓存
    description: FakeIP / DNS 缓存清理.
  - name: 运行配置
    description: 运行配置的读取、重载与修改.
  - name: 更新
    description: 内核、面板与 GEO 数据库的更新.
  - name: 策略组
    description: 策略组的查询与延迟测试.
  - name: 代理
    description: 代理节点的查询、选择与延迟测试.
  - name: 代理集合
    description: 代理集合（proxy provider）的查询、更新与健康检查.
  - name: 规则
    description: 规则的查询与临时禁用.
  - name: 规则集合
    description: 规则集合（rule provider）的查询与更新.
  - name: 连接
    description: 连接信息的查询与关闭.
  - name: 域名查询
    description: 通过内核 DNS 进行域名解析.
  - name: 存储
    description: 内核键值存储的读写.
  - name: DEBUG
    description: 调试相关端点（需内核日志级别为 debug）.
paths:
  /providers/rules:
    get:
      tags:
        - 规则集合
      summary: 获取所有规则集合
      description: 获取所有规则集合的所有信息.
      operationId: getRuleProviders
      responses:
        '200':
          description: 规则集合列表.
          content:
            application/json:
              schema:
                type: object
                properties:
                  providers:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/RuleProvider'
              example:
                providers:
                  example_ruleset:
                    name: example_ruleset
                    type: Rule
                    vehicleType: HTTP
                    behavior: Domain
                    ruleCount: 5
                    format: MrsRule
                    updatedAt: '2026-06-22T06:57:33Z'
components:
  schemas:
    RuleProvider:
      type: object
      description: 规则集合（rule provider）元信息.
      properties:
        name:
          type: string
          example: example_ruleset
        type:
          type: string
          example: Rule
        vehicleType:
          type: string
          example: HTTP
        behavior:
          type: string
          example: Domain
        ruleCount:
          type: integer
          example: 5
        format:
          type: string
          example: MrsRule
        updatedAt:
          type: string
          format: date-time
          example: '2026-06-22T06:57:33Z'
        payload:
          type: array
          items:
            type: string
          description: 可选，部分实现会附带规则 payload.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        在请求头中携带 Authorization: Bearer ${secret}，其中 secret 对应配置中的 secret 字段.若未设置
        secret 可省略，但强烈建议设置.

````