URL: fileManagerConfig.listUrl, Method: POST
{ "params": {
"mode": "list",
"onlyFolders": false,
"path": "/public_html"
}}
{ "result": [
{
"name": "joomla",
"rights": "drwxr-xr-x",
"size": "4096",
"date": "2015-04-29 09:04:24",
"type": "dir"
}, {
"name": "magento",
"rights": "drwxr-xr-x",
"size": "4096",
"date": "17:42",
"type": "dir"
}, {
"name": "index.php",
"rights": "-rw-r--r--",
"size": "549923",
"date": "2013-11-01 11:44:13",
"type": "file"
}
]}
URL: fileManagerConfig.renameUrl, Method: POST
{ "params": {
"mode": "rename",
"path": "/public_html/index.php",
"newPath": "/public_html/index2.php"
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.copyUrl, Method: POST
{ "params": {
"mode": "copy",
"path": "/public_html/index.php",
"newPath": "/public_html/index-copy.php"
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.removeUrl, Method: POST
{ "params": {
"mode": "delete",
"path": "/public_html/index.php",
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.editUrl, Method: POST
{ "params": {
"mode": "savefile",
"content": "<?php echo random(); ?>",
"path": "/public_html/index.php",
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.getContentUrl, Method: POST
{ "params": {
"mode": "editfile",
"path": "/public_html/index.php"
}}
{ "result": "<?php echo random(); ?>" }
URL: fileManagerConfig.createFolderUrl, Method: POST
{ "params": {
"mode": "addfolder",
"name": "new-folder",
"path": "/public_html"
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.permissionsUrl, Method: POST
{ "params": {
"mode": "changepermissions",
"path": "/public_html/index.php",
"perms": "653",
"permsCode": "rw-r-x-wx",
"recursive": false
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.compressUrl, Method: POST
{ "params": {
"mode": "compress",
"path": "/public_html/compressed.zip",
"destination": "/public_html/backups"
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.extractUrl, Method: POST
{ "params": {
"mode": "extract",
"destination": "/public_html/extracted-files",
"path": "/public_html/compressed.zip",
"sourceFile": "/public_html/compressed.zip"
}}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.uploadUrl, Method: POST, Content-Type: multipart/form-data
Unlimited file upload, each item will be enumerated as file-1, file-2, etc.
[fileManagerConfig.uploadUrl]?destination=/public_html/image.jpg&file-1={..}&file-2={...}
{ "result": { "success": true, "error": null } }
URL: fileManagerConfig.downloadFileUrl, Method: GET
[fileManagerConfig.downloadFileUrl]?mode=download&preview=true&path=/public_html/image.jpg
-File content
Any backend error should be with an error 500 HTTP code. Btw, you can also report errors with a 200 response both using this json structure
{ "result": {
"success": false,
"error": "Access denied to remove file"
}}