exports

Download an export

GET /v1/exports/{id}/download

Download a generated export file, with Range support. Files last 7 days; create another export after expiry.

Parameters

id

path · Required

Resource, job or operation identifier

Type: string

Complete JSON Schema
{
  "type": "string",
  "format": "uuid"
}

Range

header · Optional

Single byte range, for example bytes=0-1023

Type: string

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

Request example

Replace path and request parameters with actual values. For requests with a body, save it as request.json using the schema above.

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

Responses

200, 206

ZIP64 export file

application/zip

Type: string

Complete JSON Schema
{
  "type": "string",
  "format": "binary"
}

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

Error response; branch on code.

application/json

Type: object

FieldTypeRequiredDescription and constraints
codestringYesMachine-readable error code
messagestringNoError message; use code for program logic
requestIdstringNoRequest trace identifier
operationIdstringNoRequest receipt identifier; no status polling is needed
Complete JSON Schema
{
  "type": "object",
  "required": [
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "Machine-readable error code"
    },
    "message": {
      "type": "string",
      "description": "Error message; use code for program logic"
    },
    "requestId": {
      "type": "string",
      "description": "Request trace identifier"
    },
    "operationId": {
      "type": "string",
      "description": "Request receipt identifier; no status polling is needed"
    }
  },
  "additionalProperties": true
}

On this page