API call example:
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.filemanager.list</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<string>ID_folder</string>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 hash can be found in your Mailkit account's menu Profile/Integration.
ID_folder = ID of the folder to list. If no ID is provided files and folders from the root folder will be listed.
* required value
Successful call response:
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>NAME</name>
<value>
<string>untitled folder</string>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>yyyy-mm-dd hh:mm:ss</string>
</value>
</member>
<member>
<name>ID_FOLDER</name>
<value>
<i4>123456</i4>
</value>
</member>
<member>
<name>PARENT</name>
<value>
<string>parent folder</string>
</value>
</member>
<member>
<name>TYPE</name>
<value>
<string>DIR</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>NAME</name>
<value>
<string>abcdefg.gif</string>
</value>
</member>
<member>
<name>LENGTH</name>
<value>
<i4>1012135</i4>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>yyyy-mm-dd hh:mm:ss</string>
</value>
</member>
<member>
<name>PARENT</name>
<value>
<string>parent folder</string>
</value>
</member>
<member>
<name>TYPE</name>
<value>
<string>FILE</string>
</value>
</member>
<member>
<name>ID_FILE</name>
<value>
<i4>98765432</i4>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
NAME = file / folder name
DATE = create date of file / folder
ID_FOLDER = ID folder
PARENT = parent folder. ROOT in case of root folder listing.
TYPE
- DIR = folder
- FILE = file
LENGTH = file size (in bytes)
ID_FILE = file ID
Unsuccesfull call response:
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string></string>
</value>
</param>
</params>
</methodResponse>
Values
Empty list = empty folder or invalid folder ID supplied