导出

下载导出文件

GET /v1/exports/{id}/download

下载已生成的导出文件,支持 Range。文件保留 7 天,过期后请重新创建导出。

请求参数

id

path · 必填

资源、任务或操作标识

类型: string

完整 JSON Schema
{
  "type": "string",
  "format": "uuid"
}

Range

header · 可选

单段字节范围,例如 bytes=0-1023

类型: string

完整 JSON Schema
{
  "type": "string",
  "pattern": "^bytes=[0-9]+-[0-9]*$"
}

调用示例

将路径参数和请求参数替换为实际值。请求体按上述结构保存到 request.json。

curl --fail-with-body --request GET 'https://api.treering.cn/v1/exports/{id}/download' \
  --header "Authorization: Bearer $TREERING_API_TOKEN"

响应

200, 206

ZIP64 导出文件

application/zip

类型: string

完整 JSON Schema
{
  "type": "string",
  "format": "binary"
}

400, 401, 403, 404, 409, 410, 416, 429, 500, 503

错误响应;请按 code 处理。

application/json

类型: object

字段类型必填说明与约束
codestring是机器可读错误码
messagestring否错误说明;请按 code 处理程序逻辑
requestIdstring否请求追踪标识
operationIdstring否请求回执标识,无需查询状态
完整 JSON Schema
{
  "type": "object",
  "required": [
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "机器可读错误码"
    },
    "message": {
      "type": "string",
      "description": "错误说明;请按 code 处理程序逻辑"
    },
    "requestId": {
      "type": "string",
      "description": "请求追踪标识"
    },
    "operationId": {
      "type": "string",
      "description": "请求回执标识,无需查询状态"
    }
  },
  "additionalProperties": true
}

目录