Skip to main content

API Details

List Directory

ItemValue
PathGET /fileManage/list
AuthenticationLogin required, CSRF Token required

Description: Retrieves the list of files and folders in a specified directory, with pagination and sorting support.

Request Parameters

Headers

ParameterRequiredDescription
CookieYesUser authentication
X-Csrf-TokenYesCSRF protection token

Query

ParameterRequiredTypeDefaultDescription
pathYesstringNoneAbsolute path, e.g., /Volume1/Public
pageNointeger1Page number, starting from 1
limitNointeger50Number of items per page
ruleNostringNoneSort field: time / size / nature / file_type / owner / del_time / a_time
orderNobooleantruetrue = 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

FieldDescription
f_typefolder = folder, file = file, app_link = app link, music = audio file, video = video file, image = image file
hiddentrue = hidden file
totalTotal number of records (pagination info)

Get File Details

ItemValue
PathGET /fileManage/folderInfoAll
AuthenticationLogin required, CSRF Token required

Description: Retrieves complete details of a file or folder, including permissions and statistics.

Request Parameters

Query

ParameterRequiredDescription
pathYesAbsolute 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

FieldDescription
acl_type0 = standard permissions, 1 = custom permissions
file_quantityTotal number of files under the folder
folder_quantityTotal number of subfolders
is_only_readtrue = read-only file system

Create File or Folder

ItemValue
PathPOST /fileManage/CreateFolder
AuthenticationLogin required, CSRF Token required

Description: Creates a new file or folder at the specified path.

Request Parameters

Body (JSON)

ParameterRequiredTypeDefaultDescription
pathYesstringNoneFull absolute path
typeYesintegerNone1 = file, 2 = folder
back_upNointeger00 = 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

ItemValue
PathPOST /fileManage/folderRename
AuthenticationLogin required, CSRF Token required

Description: Renames a file or folder.

Request Parameters

Body (JSON)

ParameterRequiredDescription
pathYesCurrent absolute path
r_nameYesNew 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

ItemValue
PathPOST /fileManage/moveFiles
AuthenticationLogin required, CSRF Token required

Description: Moves or copies files/folders to a target directory in batch.

Request Parameters

Body (JSON)

ParameterRequiredTypeDefaultDescription
pathsYesarrayNoneArray of source absolute paths
to_pathYesstringNoneTarget directory absolute path
typeYesintegerNone1 = copy, 2 = move
on_conflictNointeger11 = 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
}

data is the task ID (asynchronous operation) or an empty string (synchronous completion).

Delete

ItemValue
PathDELETE /fileManage/folder/del
AuthenticationCookie only, no CSRF

Description: Deletes files/folders in batch, with options to move to recycle bin or force delete.

Request Parameters

Body (JSON)

ParameterRequiredTypeDefaultDescription
pathsYesarrayNoneArray of absolute paths to delete
is_forceNobooleanfalsetrue = 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
}

data is true if the task was created successfully, false otherwise.

Restore from Recycle Bin

ItemValue
PathPOST /fileManage/restoreRecycle
AuthenticationLogin required, CSRF Token required

Description: Restores deleted files from the recycle bin to their original paths.

Request Parameters

Body (JSON)

ParameterRequiredTypeDefaultDescription
pathsYesarrayNone[{"path":"absolute_path"}]
on_conflictYesintegerNone1 = 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)

ItemValue
PathPOST /fileManage/prepareFileDownload
AuthenticationLogin required, CSRF Token required

Description: Generates a download ticket for subsequent file download.

Request Parameters

Body (JSON)

ParameterRequiredDescription
pathsYesAbsolute 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

ItemValue
PathPOST /fileManage/upload
AuthenticationLogin required, CSRF Token required
Encodingmultipart/form-data

Description: Uploads a file in chunks, supporting large files and batch uploads.

Request Parameters

Headers

ParameterRequiredDescription
CookieYesUser authentication
X-Csrf-TokenYesCSRF protection token

Form Data

ParameterRequiredTypeDescription
filenameYesstringFile name
dirYesstringAbsolute path of the target directory
fileYesfileBinary data of the current chunk
task_idYesstringUnique identifier for this upload task
offsetYesintegerStarting position of the current chunk (bytes)
block_sizeYesintegerChunk size (bytes)
block_hashYesstringCRC32 of the current chunk
file_hashYesstringCRC32 of the entire file (required only for the last chunk)
task_sizeYesintegerRemaining total file size (bytes)
last_mod_timeYesintegerFile modification time (Unix timestamp)
is_task_centerYesbooleantrue = task center task
indexYesintegerFile sequence number, starting from 0
upload_operation_typeYesinteger1 = rename, 2 = overwrite, 3 = skip
auto_create_dirYesbooleantrue = auto-rename, false = no
folder_pathNostringParent directory path (required when uploading a folder)
folder_countsNointegerTotal 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
}

data is true if the chunk was uploaded successfully.