Oms API GET user files tree - openmpp/openmpp.github.io GitHub Wiki
GET files tree from user files directory on the server.
If user files access enabled in server configuration then user can upload or download files, create or delete folders in user files directory.
This is a beta version and may change in the future.
This method retruns files and folders tree under user files server directory.
Method:
GET /api/files/file-tree/:ext/path/:path
GET /api/files/file-tree/:ext/path/
GET /api/files/file-tree/:ext/path
GET /api/files/file-tree/:ext/path?path=....
Arguments:
:ext - (required) comma separated list of files extension, for example: `ini` or `csv,tsv`. Use `_ or `*` to get all files, with any extension.
:path - (optional) if not empty then return list of the files in specified folder, else entire tree of user files.
Call examples from browser:
http://localhost:4040/api/files/file-tree/ini/path
http://localhost:4040/api/files/file-tree/.INI/path
http://localhost:4040/api/files/file-tree/csv%2Ctsv/path/upload
http://localhost:4040/api/files/file-tree/_/path
http://localhost:4040/api/files/file-tree/log/path/download
http://localhost:4040/api/files/file-tree/_/path?path=upload%2FmodelOne.set.New
Please notice URL encoded: csv%2Ctsv
which is csv,tsv
and ?path=upload%2FmodelOne.set.New
is used to specify upload/modelOne.set.New
path
query parameter.
Return example:
[
{
"Path": "upload/modelOne.set.New",
"IsDir": true,
"Size": 0,
"ModTime": 1718249290709
},
{
"Path": "upload/modelOne.set.New/modelOne.set.New",
"IsDir": true,
"Size": 0,
"ModTime": 1718249290709
},
{
"Path": "upload/modelOne.set.New/modelOne.set.New/modelOne.set.New.json",
"IsDir": false,
"Size": 267,
"ModTime": 1718249290709
},
{
"Path": "upload/modelOne.set.New/modelOne.set.New/set.New",
"IsDir": true,
"Size": 0,
"ModTime": 1718249290709
}
]