API Details
List Directory
| Item | Value |
|---|---|
| Path | GET /fileManage/list |
| Authentication | Login required, CSRF Token required |
Description: Retrieves the list of files and folders in a specified directory, with pagination and sorting support.
Request Parameters
Headers
| Parameter | Required | Description |
|---|---|---|
| Cookie | Yes | User authentication |
| X-Csrf-Token | Yes | CSRF protection token |
Query
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| path | Yes | string | None | Absolute path, e.g., /Volume1/Public |
| page | No | integer | 1 | Page number, starting from 1 |
| limit | No | integer | 50 | Number of items per page |
| rule | No | string | None | Sort field: time / size / nature / file_type / owner / del_time / a_time |
| order | No | boolean | true | true = descending, false = ascending |
Request Example
curl -X GET "https://{ip}:5443/fileManage/list?path=/Volume1/Public&rule=time&order=true" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789"
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": {
"data": [
{
"name": "Music",
"path": "/Volume1/Public/Music",
"volume": "Volume1",
"f_type": "folder",
"size": 4096,
"size_friendly": "4.0KB",
"owner": "admin",
"permission": "rwxr-xr-x",
"m_time_stamp": 1722155400,
"hidden": false
},
{
"name": "report.pdf",
"path": "/Volume1/Public/report.pdf",
"volume": "Volume1",
"f_type": "file",
"size": 2516582,
"size_friendly": "2.4MB",
"owner": "admin",
"permission": "rw-r--r--",
"m_time_stamp": 1722114900,
"hidden": false
}
],
"total": 2
},
"is_login": true,
"time": 0.047
}
Key Fields
| Field | Description |
|---|---|
| f_type | folder = folder, file = file, app_link = app link, music = audio file, video = video file, image = image file |
| hidden | true = hidden file |
| total | Total number of records (pagination info) |
Get File Details
| Item | Value |
|---|---|
| Path | GET /fileManage/folderInfoAll |
| Authentication | Login required, CSRF Token required |
Description: Retrieves complete details of a file or folder, including permissions and statistics.
Request Parameters
Query
| Parameter | Required | Description |
|---|---|---|
| path | Yes | Absolute path of the file or folder |
Request Example
curl -X GET "https://{ip}:5443/fileManage/folderInfoAll?path=/Volume1/Public/Music" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789"
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": {
"name": "Music",
"path": "/Volume1/Public/Music",
"volume": "Volume1",
"f_type": "folder",
"size": 4096,
"owner": "admin",
"permission": "rwxr-xr-x",
"acl_type": 0,
"file_quantity": 150,
"folder_quantity": 12,
"child_folders_info": [
{"name": "Albums", "path": "/Volume1/Public/Music/Albums"}
],
"m_time": "2026-07-28 14:30:00",
"is_only_read": false
},
"is_login": true,
"time": 0.159
}
Key Fields
| Field | Description |
|---|---|
| acl_type | 0 = standard permissions, 1 = custom permissions |
| file_quantity | Total number of files under the folder |
| folder_quantity | Total number of subfolders |
| is_only_read | true = read-only file system |
Create File or Folder
| Item | Value |
|---|---|
| Path | POST /fileManage/CreateFolder |
| Authentication | Login required, CSRF Token required |
Description: Creates a new file or folder at the specified path.
Request Parameters
Body (JSON)
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| path | Yes | string | None | Full absolute path |
| type | Yes | integer | None | 1 = file, 2 = folder |
| back_up | No | integer | 0 | 0 = no backup, 1 = backup |
Request Example
curl -X POST "https://{ip}:5443/fileManage/CreateFolder" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-d '{"path":"/Volume1/Public/NewFolder","type":2}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": {
"name": "NewFolder",
"path": "/Volume1/Public/NewFolder",
"f_type": "folder",
"size": 4096,
"owner": "admin",
"m_time": "2026-08-05 10:00:00"
},
"is_login": true,
"time": 0.052
}
Rename
| Item | Value |
|---|---|
| Path | POST /fileManage/folderRename |
| Authentication | Login required, CSRF Token required |
Description: Renames a file or folder.
Request Parameters
Body (JSON)
| Parameter | Required | Description |
|---|---|---|
| path | Yes | Current absolute path |
| r_name | Yes | New name (without path) |
Request Example
curl -X POST "https://{ip}:5443/fileManage/folderRename" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-d '{"path":"/Volume1/Public/OldName","r_name":"NewName"}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": {
"name": "NewName",
"path": "/Volume1/Public/NewName",
"f_type": "folder",
"m_time": "2026-08-05 10:05:00",
"owner": "admin"
},
"is_login": true,
"time": 0.005
}
Move or Copy
| Item | Value |
|---|---|
| Path | POST /fileManage/moveFiles |
| Authentication | Login required, CSRF Token required |
Description: Moves or copies files/folders to a target directory in batch.
Request Parameters
Body (JSON)
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| paths | Yes | array | None | Array of source absolute paths |
| to_path | Yes | string | None | Target directory absolute path |
| type | Yes | integer | None | 1 = copy, 2 = move |
| on_conflict | No | integer | 1 | 1 = rename, 2 = overwrite, 3 = skip |
Request Example
curl -X POST "https://{ip}:5443/fileManage/moveFiles" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-d '{"paths":["/Volume1/Public/a.pdf"],"to_path":"/Volume1/Archive","type":2,"on_conflict":1}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": "task_20260805_100000_abc123",
"is_login": true,
"time": 0.018
}
datais the task ID (asynchronous operation) or an empty string (synchronous completion).
Delete
| Item | Value |
|---|---|
| Path | DELETE /fileManage/folder/del |
| Authentication | Cookie only, no CSRF |
Description: Deletes files/folders in batch, with options to move to recycle bin or force delete.
Request Parameters
Body (JSON)
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| paths | Yes | array | None | Array of absolute paths to delete |
| is_force | No | boolean | false | true = force delete (irreversible), false = move to recycle bin |
Request Example
curl -X DELETE "https://{ip}:5443/fileManage/folder/del" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123" \
-d '{"paths":["/Volume1/Public/a.pdf"],"is_force":false}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": true,
"is_login": true,
"time": 0.0007
}
dataistrueif the task was created successfully,falseotherwise.
Restore from Recycle Bin
| Item | Value |
|---|---|
| Path | POST /fileManage/restoreRecycle |
| Authentication | Login required, CSRF Token required |
Description: Restores deleted files from the recycle bin to their original paths.
Request Parameters
Body (JSON)
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| paths | Yes | array | None | [{"path":"absolute_path"}] |
| on_conflict | Yes | integer | None | 1 = rename, 2 = overwrite, 3 = skip |
Request Example
curl -X POST "https://{ip}:5443/fileManage/restoreRecycle" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-d '{"paths":[{"path":"/Volume1/Public/a.pdf"}],"on_conflict":1}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": true,
"is_login": true,
"time": 0.0007
}
Prepare Download (Return Ticket)
| Item | Value |
|---|---|
| Path | POST /fileManage/prepareFileDownload |
| Authentication | Login required, CSRF Token required |
Description: Generates a download ticket for subsequent file download.
Request Parameters
Body (JSON)
| Parameter | Required | Description |
|---|---|---|
| paths | Yes | Absolute path of the file; multiple paths separated by commas (no spaces) |
Request Example
curl -X POST "https://{ip}:5443/fileManage/prepareFileDownload" \
-H "Content-Type: application/json" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-d '{"paths":"/Volume1/Public/a.pdf"}'
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": {
"ticket": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
},
"is_login": true,
"time": 0.071
}
File Upload
| Item | Value |
|---|---|
| Path | POST /fileManage/upload |
| Authentication | Login required, CSRF Token required |
| Encoding | multipart/form-data |
Description: Uploads a file in chunks, supporting large files and batch uploads.
Request Parameters
Headers
| Parameter | Required | Description |
|---|---|---|
| Cookie | Yes | User authentication |
| X-Csrf-Token | Yes | CSRF protection token |
Form Data
| Parameter | Required | Type | Description |
|---|---|---|---|
| filename | Yes | string | File name |
| dir | Yes | string | Absolute path of the target directory |
| file | Yes | file | Binary data of the current chunk |
| task_id | Yes | string | Unique identifier for this upload task |
| offset | Yes | integer | Starting position of the current chunk (bytes) |
| block_size | Yes | integer | Chunk size (bytes) |
| block_hash | Yes | string | CRC32 of the current chunk |
| file_hash | Yes | string | CRC32 of the entire file (required only for the last chunk) |
| task_size | Yes | integer | Remaining total file size (bytes) |
| last_mod_time | Yes | integer | File modification time (Unix timestamp) |
| is_task_center | Yes | boolean | true = task center task |
| index | Yes | integer | File sequence number, starting from 0 |
| upload_operation_type | Yes | integer | 1 = rename, 2 = overwrite, 3 = skip |
| auto_create_dir | Yes | boolean | true = auto-rename, false = no |
| folder_path | No | string | Parent directory path (required when uploading a folder) |
| folder_counts | No | integer | Total file count (required when uploading a folder) |
Request Example
curl -X POST "https://{ip}:5443/fileManage/upload" \
-H "Cookie: userName=admin; TMSESSNAME=abc123; X-Csrf-Token=xyz789" \
-H "X-Csrf-Token: xyz789" \
-F "filename=a.txt" \
-F "dir=/Volume1/Public" \
-F "file=@a.txt" \
-F "task_id=123456" \
-F "offset=0" \
-F "block_size=1024" \
-F "block_hash=0ffff" \
-F "file_hash=0ffff" \
-F "task_size=1024" \
-F "last_mod_time=1722780000" \
-F "is_task_center=true" \
-F "index=0" \
-F "upload_operation_type=1" \
-F "auto_create_dir=false"
Response Example
{
"code": true,
"code_num": 0,
"code_msg": "",
"data": true,
"is_login": true,
"time": 0.099
}
dataistrueif the chunk was uploaded successfully.