API call example:
JSON
{
"function": "mailkit.filemanager.delete",
"id":"client_id",
"md5":"client_md5",
"parameters": {
"ID_file": "654789",
"type": "file"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.filemanager.delete</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<i4>ID_file/ID_folder</i4>
</value>
</param>
<param>
<value>
<string>file/dir</string>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
ID_file/ID_folder * = ID of the file or folder to be deleted (returned by the mailkit.filemanager.list function)
file/dir * = delete file or folder (deleted unempty folders is disabled)
- file = file
- dir = folder
* required value
Successful call response:
JSON
{
"error_status": 0,
"data": "DELETED"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>DELETED</string>
</value>
</param>
</params>
</methodResponse>
Values
DELETED = file or folder was succesfully deleted
Unsuccessful call response:
JSON
{
"error_status": 1,
"error": "Directory is not empty"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string>Invalid ID_file</string>
</value>
</param>
</params>
</methodResponse>
Values
Invalid ID_file
Invalid ID_folder
Directory is not empty = the folder can not be deleted