Query export files¶
Lists the files in the export task and the processing status of each file.
POST https://moi.matrixorigin.cn/newmoi/export/task/files
Preparation before calling¶
First Query task details to confirm the export task you want to view. Prepare a personal access token with access to the target workspace, the target workspace ID, and the export task ID.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$TASK_ID: To view the export task ID of the file, fill in thetask_idfield in the request body.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/export/task/files" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"task_id": "'$TASK_ID'"
}'
Request body¶
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The export task ID of the file to be queried. |
|
integer |
No |
This page returns the number of items; if not passed, it will be |
|
integer |
no |
Paging offset. |
|
integer[] |
No |
Filter by file status. |
|
string |
No |
Order field: |
|
string |
No |
Sorting direction: |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
Returns 200 on success. data.files returns each export record and its status; details can be used to locate the cause of failure.
{
"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": "<failure description>",
"create_time": "2026-08-18T10:00:00Z",
"start_time": "2026-08-18T10:01:00Z",
"end_time": "2026-08-18T10:02:00Z"
}],
"total": 1,
"total_success": 0,
"total_failure": 1,
"total_files": 1
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object[] |
Export file record list. |
|
string |
Export record ID; used to specify the retry file. |
|
string |
File name. |
|
string |
The extension identified by the file name. |
|
integer |
|
|
string[] |
The full path of the source file. |
|
string |
Processing details or failure instructions. |
|
string or null |
Creation time. |
|
string or null |
The time to start exporting; |
|
string or null |
End time; |
|
integer |
The number of matching records on this page. |
|
integer |
Total number of files exported successfully by the task. |
|
integer |
Total number of files whose export failed in the task. |
|
integer |
The total number of files in the task. |
Error response¶
{
"code": "ErrServer",
"msg": "Internal server error",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
— |
The request body cannot be parsed; this compatible path returns an |
Pass in a valid |
|
|
The task does not exist or the file record query failed. |
Check the task ID and try again. |
|
|
The current identity does not have permission to read the task. |
Request that read permission be granted to the export task. |
Follow-up operations¶
Use the failed file ID for Rerun task; after retrying, Query task status to confirm whether the number of failures is cleared.