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

# 查询诊断任务列表



## OpenAPI

````yaml /specs/bp-agent.openapi.json get /api/open/runs
openapi: 3.1.0
info:
  title: BP-Agent Open API
  description: BP-Agent 对外 API：PDF 上传、异步诊断、结果下载及专项业务能力。所有接口使用租户 API Token 鉴权。
  contact:
    name: BP Agent 开发团队
    email: support@bpagent.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
servers:
  - url: https://bptest.mapleai.cc
    description: 测试环境（仅 relay 上传）
  - url: https://project.mapleai.cc
    description: 生产环境（OSS；STS 直传需服务端启用）
security: []
paths:
  /api/open/runs:
    get:
      tags:
        - 开放接口 / Open Runs
      summary: 查询诊断任务列表
      operationId: list_open_runs_api_open_runs_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 过滤状态
            title: Status
          description: 过滤状态
        - name: target
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 64
              - type: 'null'
            description: 过滤流水线种类
            title: Target
          description: 过滤流水线种类
        - name: keyword
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 搜索关键词
            title: Keyword
          description: 搜索关键词
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: 每页数量
            default: 10
            title: Limit
          description: 每页数量
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: 偏移量
            default: 0
            title: Offset
          description: 偏移量
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_PipelineRunListItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PaginatedResponse_PipelineRunListItem_:
      properties:
        code:
          type: integer
          title: Code
          description: 响应码，0表示成功，非0表示失败
          default: 0
        message:
          type: string
          title: Message
          description: 响应消息
          default: 操作成功
        data:
          items:
            $ref: '#/components/schemas/PipelineRunListItem'
          type: array
          title: Data
          description: 当前页的数据列表
        timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timestamp
          description: 响应时间戳（可选）
        total:
          type: integer
          minimum: 0
          title: Total
          description: 总记录数
        page:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Page
          description: 当前页码
        page_size:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Page Size
          description: 每页大小
        total_pages:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Total Pages
          description: 总页数
      type: object
      required:
        - data
        - total
      title: PaginatedResponse[PipelineRunListItem]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PipelineRunListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: 流水线运行ID
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
          description: 租户ID
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
          description: 创建用户ID（为空表示非用户发起）
        target:
          anyOf:
            - type: string
            - type: 'null'
          title: Target
          description: 业务类型/目标阶段（如 export_preliminary/export_optimization）
        created_by:
          type: string
          title: Created By
          description: 创建人展示名；API 令牌调用优先显示 API·令牌备注
        created_by_type:
          type: string
          title: Created By Type
          description: 创建来源类型：user/api/channel
        status:
          type: string
          title: Status
          description: 运行状态
        queue_message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Queue Message Id
          description: 最新一次入队消息ID（Taskiq task_id）
        progress:
          type: integer
          title: Progress
          description: 进度百分比
        total_tasks:
          type: integer
          title: Total Tasks
          description: 总任务数
        completed_tasks:
          type: integer
          title: Completed Tasks
          description: 已完成任务数
        failed_tasks:
          type: integer
          title: Failed Tasks
          description: 失败任务数
        input_file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Input File Name
          description: 输入文件名
        output_files:
          items:
            type: string
          type: array
          title: Output Files
          description: 输出文件列表
        points_consumed:
          type: integer
          title: Points Consumed
          description: 消耗积分数
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
          description: 开始时间
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
          description: 完成时间
        created_at:
          type: string
          title: Created At
          description: 创建时间
      type: object
      required:
        - id
        - tenant_id
        - created_by
        - created_by_type
        - status
        - progress
        - total_tasks
        - completed_tasks
        - failed_tasks
        - points_consumed
        - created_at
      title: PipelineRunListItem
      description: 流水线列表项响应
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````