文档

API 参考

下载结果

为任务的某个结果文件获取新的下载链接。

为某个结果文件返回新的 download_url。GET /tasks/{task_id}/results 返回的 URL 生存期很短;当某个 URL 过期时调用此接口。

如果结果文件已在任务所属项目中登记(kernel 产物通常如此),该 URL 指向 GET /experimental/files/{file_id}/content,可用同一个 bearer key 直接下载;否则会回退为站内 /api/files/... 链接,需要浏览器会话。

OpenAPI

openapi: 3.1.0
info:
  title: BioAgent API — V1
  description: Public API for BioAgent, the biomedical AI agent platform.
  version: 0.1.0
servers:
  - url: https://bioagent.cloud/api/v1
    description: >-
      BioAgent public API base URL. Every endpoint on this page is served from
      this host.
security: []
paths:
  /experimental/tasks/{task_id}/results/{result_id}/download:
    get:
      tags:
        - results
      summary: Download a result
      description: Get a fresh download link for one of a task's result files.
      operationId: >-
        get_result_download_url_experimental_tasks__task_id__results__result_id__download_get
      parameters:
        - name: result_id
          in: path
          required: true
          schema:
            type: string
            title: Result Id
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: A new download URL for the result file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultDownload'
              example:
                type: result_download
                result_id: res_016YNAz7cvmPXcqvGoR1U57t
                download_url: >-
                  https://<bucket>.s3.us-west-2.amazonaws.com/orgs/<org>/users/<user>/results/projects/proj_6b3606df1c/sessions/sess_4c1a28c0e48b/BRCA1_ClinVar_variant_summary.md?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=...
      security:
        - bearerAuth: []
components:
  schemas:
    ResultDownload:
      properties:
        type:
          type: string
          const: result_download
          title: Type
          default: result_download
        result_id:
          type: string
          title: Result Id
        download_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Download Url
      type: object
      required:
        - result_id
      title: ResultDownload
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Requires an API key. See the Authentication guide.