> ## 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/{run_id}
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/{run_id}:
    get:
      tags:
        - 开放接口 / Open Runs
      summary: 查询诊断任务详情
      operationId: get_open_run_api_open_runs__run_id__get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse_PipelineRunDetail_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SuccessResponse_PipelineRunDetail_:
      properties:
        code:
          type: integer
          title: Code
          description: 响应码，成功时为0
          default: 0
        message:
          type: string
          title: Message
          description: 成功消息
          default: 操作成功
        data:
          $ref: '#/components/schemas/PipelineRunDetail'
          description: 响应数据
        timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timestamp
          description: 响应时间戳（可选）
      type: object
      title: SuccessResponse[PipelineRunDetail]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PipelineRunDetail:
      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_files:
          anyOf:
            - type: object
            - type: 'null'
          title: Input Files
          description: 输入文件信息
        output_files:
          items:
            type: object
          type: array
          title: Output Files
          description: 输出文件列表
        run_metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Run Metadata
          description: 运行元数据
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
          description: 运行元数据（兼容字段）
        points_consumed:
          type: integer
          title: Points Consumed
          description: 消耗积分数
        point_transaction:
          anyOf:
            - type: object
            - type: 'null'
          title: Point Transaction
          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: 创建时间
        updated_at:
          type: string
          title: Updated 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
        - updated_at
      title: PipelineRunDetail
      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

````