Ajaxplorer
Driver API v 2.3
Table des matières
Introduction.......................................................................................................................................................1
QUERY ls.........................................................................................................................................................1
QUERY download.............................................................................................................................................3
QUERY image_proxy........................................................................................................................................4
ANNEX 1 : Available icons................................................................................................................................5
Introduction
This document describes the API queries that an Ajaxplorer driver must implement. A service driver must
propose one entry point that will handle all the queries via the «get_action» parameter.
. The minimal required implemented query is «ls». For the client to be usable, it is also recommended to
implement the «image_proxy» and «download» queries, which are quite straitforward.
. All communication (parameters and results) is UTF8 encoded, thus, depending on the host system
encoding, you may have to utf8_decode the parameters to find your files, and in that case do not forget to
reencode all dirnames and filenames when sending result.
. XML Formatting : the Xml samples are presented here with lot of spaces and linebreaks for a better
visibility, but be sure to remove all linebreaks to send efficient xml strings as results and to avoid
unnecessary blank nodes when parsing DOM XML. For example, the server should answer to a simple «ls»
query in «complete» mode :
<?xml version="1.0" encoding="UTF-8"?><tree><tree text="Musique"/><tree
text="Photos"/></tree>
QUERY ls
Listing of one directory. The client will always ask for one level of listing, never a recursive listing. The default
repository is «/», which is the root of the repository and must be configured internally. The driver must check
that no one tries to access «../» or such security breaches.
Query method
HTTP GET
Query Parameters
● get_action : ls
● dir : [default : /]. Example : /mypath/to/a/directory
● mode : [file_list|search|complete|null] : defines the result format.
Display modes can be separated as follow :
• null (no parameter passed) : listing of folders only
• complete : folders only but very light, for autocompletion
• file_list : files and folders with details
• search : files and folders very light, used for search engine.