Query export files

Lists the files in the export task and the processing status of each file.

HTTP
POST $CLOUDSIGMA_API_BASE/export/task/files

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Get the task ID from Query export task details. Prepare personal access token and target workspace ID that can access the target workspace.

Request body

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $TASK_ID with actual values.

Read one page of file

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/files" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d @- <<EOF
{
    "task_id": "$TASK_ID",
    "limit": 20,
    "offset": 0
  }
EOF

Filter and sort files

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/files" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d @- <<EOF
{
    "task_id": "$TASK_ID",
    "statuses": [3],
    "order_by": "ended_at",
    "order_direction": "asc",
    "limit": 20,
    "offset": 0
  }
EOF

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/files" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d @- <<EOF
{
    "task_id": "$TASK_ID",
    "limit": 20,
    "offset": 20
  }
EOF

Read one page of file

Parameter

Type

Required

Description

task_id

string

Yes

To view the export task ID of the file.

limit

integer

No

This page returns the number of items. When omitted or less than or equal to 0, it is 20. Same as previous page.

offset

integer

No

The number of file records to skip. offset on the previous page plus the number of items read on this page. Stop reading when offset is not less than data.total.

statuses

integer (integer array)

No

File status filtering: 0 pending, 1 exporting, 2 completed, 3 failed.

order_by

string

No

Sorting field: created_at, started_at, ended_at or status.

order_direction

string

No

asc is in ascending order, and other values are in descending order.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "files": [
      {
        "id": "export-file-001",
        "file_name": "summary.csv",
        "file_type": ".csv",
        "status": 3,
        "full_path": [
          "volume-001",
          "reports",
          "summary.csv"
        ],
        "details": "目标连接器不可用",
        "create_time": "2026-08-28T10:00:00.000000+0000",
        "start_time": "2026-08-28T10:01:00.000000+0000",
        "end_time": "2026-08-28T10:02:00.000000+0000"
      }
    ],
    "total": 1,
    "total_success": 0,
    "total_failure": 1,
    "total_files": 1
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.files

array of object

Export file records.

data.files[].id

string

Export record ID.

data.files[].file_name

string

File name.

data.files[].file_type

string

The extension identified by the file name.

data.files[].status

integer

File processing status.

data.files[].full_path

array of string

The full path of the source file.

data.files[].details

string

Processing details or failure description.

data.files[].create_time

string or null

Creation time.

data.files[].start_time

string or null

Time to start exporting.

data.files[].end_time

string or null

end time.

data.total

integer

The total number of files under the current filter conditions.

data.total_success

integer

The total number of files successfully exported in the task.

data.total_failure

integer

The total number of failed files in the task.

data.total_files

integer

The total number of files in the task.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "无法读取导出文件",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on