# GetTree

## Description

Returns an XML document listing all directories and files the user has access to. Sizes are in KB.

## Sample Response

```xml
<?xml version="1.0" encoding="utf-8"?>
<result>
  <code><![CDATA[SUCCESS]]></ code>
  <message></message>
  <data>
    <directory directoryid="809" name="PDF">
      <file fileid="127" name="A.pdf" size="17423"/>
      <file fileid="1348" name="B.pdf" size="681323"/>
    </directory>
    <directory directoryid="843" name="Logos"/>
      <directory directoryid="844" name="Client A">
        <file fileid="1348" name="LogoA.jpg" size="109"/>
      </directory>
      <directory directoryid=872" name="Client B">
        <file fileid="2512" name="LogoB.jpg" size="1039"/>
      </directory>
    </directory>
  </data>
</result>
```

## Return Codes

* SUCCESS
* ERROR
* LOGIN\_SECURITY\_VIOLATION


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ipaper.io/flipbook-backend-api/media/get-tree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
