exports

Create a full export

POST /v1/exports

Create a full export job and return its id. Use the export status endpoint to check when the file is ready.

Writes require a UUID Idempotency-Key. Retry the same operation with the same key, body and etag. Results are retained for 30 days; reconcile the outcome before retrying later. Legacy timestamp:UUID keys remain accepted.

Parameters

Idempotency-Key

header · Required

Writes require a UUID Idempotency-Key. Retry the same operation with the same key, body and etag. Results are retained for 30 days; reconcile the outcome before retrying later. Legacy timestamp:UUID keys remain accepted.

Type: string

Complete JSON Schema
{
  "type": "string"
}

Request body

Required

application/json

Type: object

Complete JSON Schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

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 POST 'https://api.treering.cn/v1/exports' \
  --header "Authorization: Bearer $TREERING_API_TOKEN" \
  --header 'Idempotency-Key: <Idempotency-Key>' \
  --header 'Content-Type: application/json' \
  --data-binary @request.json

Responses

202

Successful response; status depends on the operation result.

application/json

Type: object

FieldTypeRequiredDescription and constraints
idstringYesResource, job or operation identifier
statestringYesEntry, job or operation state; meaning depends on the endpoint {"enum":["queued"]}
operationIdstringYesRequest receipt identifier; no status polling is needed
Complete JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "state",
    "operationId"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Resource, job or operation identifier"
    },
    "state": {
      "type": "string",
      "enum": [
        "queued"
      ],
      "description": "Entry, job or operation state; meaning depends on the endpoint"
    },
    "operationId": {
      "type": "string",
      "description": "Request receipt identifier; no status polling is needed"
    }
  }
}

400, 401, 403, 404, 409, 410, 413, 422, 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