This method is used to get a user's files and folders tree.
'folder_id' defines the root folder from which the tree begins.
'params' is an array of string where you can set additional parameters, which are:
On a successful operation you will receive 'listing_ok' as the status and base64 encoded zipped tree xml.
You will have to decode the received tree, and then unzip it (if you haven't set 'nozip' param). You will then get xml content like this:
(note that 'updated' and 'created' are UNIX timestamps in PST)
<?xml version="1.0" ?>
<folder id="0" name="" shared="0">
<tags></tags>
<files></files>
<folders>
<folder id="4384" name="Incoming" shared="0">
<tags>
<tag id="34" />
</tags>
<files>
<file id="68736" file_name="cows.w3g" keyword="" shared="0" size="232386"
created="1129537520" updated="1129537520">
<tags>
</tags>
</file>
<file id="68737" file_name="silver.html" keyword="" shared="0" size="15805"
created="1129537520" updated="1129537520">
<tags>
<tag id="35" />
</tags>
</file>
</files>
</folder>
<folders>
</folder>
Parameters for the folder tags may include:
Parameters for the file tags may include:
If result wasn't successful status can be:
www.box.net/api/1.0/rest?action=get_account_tree&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&auth_token=263gtmxiy8k8o2ebzs41pilbubvpn91g&folder_id=0¶ms[]=nozip
<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>listing_ok</status>
<tree>
<folder id="0" name="" shared="0">
<tags></tags>
<files></files>
<folders>
<folder id="4384" name="Incoming" shared="0">
<tags>
<tag id="34" />
</tags>
<files>
<file id="68736" file_name="cows.w3g" keyword="" shared="0" size="232386"
created="1129537520" updated="1129537520">
<tags> </tags>
</file>
<file id="68737" file_name="silver.html" keyword="" shared="0" size="15805"
created="1129537520" pdated="1129537520">
<tags>
<tag id="35" />
</tags>
</file>
</files>
</folder>
<folders>
</folder>
</tree>
</response>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:boxnet" xmlns:types="urn:boxnet/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:get_account_tree>
<api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<sid xsi:type="xsd:string">4628c8c9c4b86c22567e53d215ecdc79</sid>
<folder_id xsi:type="xsd:long">0</folder_id>
<params href="#id1" />
</tns:get_account_tree>
<soapenc:Array id="id1" soapenc:arrayType="xsd:string[0]" />
</soap:Body>
</soap:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:boxnet"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
<SOAP-ENV:Body>
<ns4:get_account_treeResponse>
<status xsi:type="xsd:string">listing_ok</status>
<tree xsi:type="xsd:base64Binary">
PD94bWwgdmVyc2lvbj0iMS4wIj8+PGZvbGRlciBpZD0iMCIgbmFtZT0iIiBzaGFyZWQ9IiIgc2hhcmVkX2xpbms9IiIgP
jx0YWdzPjwvdGFncz48ZmlsZXM+PGZpbGUgaWQ9IjI3OTEiIGZpbGVfbmFtZT0iMS5naWYiIHNoYXJlZD0iMCIgY3JlYX
RlZD0iMTE1NzUzODcwOSIgdXBkYXRlZD0iMTE2MTU5MTMxNSIgc2l6ZT0iNTA1IiBzaGFyZWRfbGluaz0iIiAgPjx0YWd
zPjwvdGFncz48L2ZpbGU+PC9maWxlcz48L2ZvbGRlcj4=
</tree>
</ns4:get_account_treeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope><br>
<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_account_tree</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<auth_token>263gtmxiy8k8o2ebzs41pilbubvpn91g</auth_token>
<folder_id>0</folder_id>
<params />
</request>
<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>listing_ok</status>
<tree>
<folder id="0" name="" shared="0">
<tags></tags>
<files></files>
<folders>
<folder id="4384" name="Incoming" shared="0">
<tags>
<tag id="34" />
</tags>
<files>
<file id="68736" file_name="cows.w3g" keyword="" shared="0" size="232386"
created="1129537520" updated="1129537520">
<tags> </tags>
</file>
<file id="68737" file_name="silver.html" keyword="" shared="0" size="15805"
created="1129537520" pdated="1129537520">
<tags>
<tag id="35" />
</tags>
</file>
</files>
</folder>
<folders>
</folder>
</tree>
</response>
Need additional assistance? Please feel free to Contact us
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |