Skip to content
This repository was archived by the owner on Aug 6, 2022. It is now read-only.

III.2.f. Superuser only content

Andrey Bogdanov edited this page Mar 19, 2016 · 4 revisions

Contents

Requests

Get file tree for a directory
/api/fileTree.json?dir=<dir>

Returns the file tree for the specified directory in the HTML form ready to use with jQueryFileTree.

Note: Your access level must be SUPERUSER.

Example:

/api/fileTree.json?dir=./boards

{
    "html": "<ul class='jqueryFileTree'><li class='file ext_js>'<a rel='./boards/test.js'>test.js</a></li></ul>"
}

On any error, an error object is returned.

Example:

/api/fileTree.json?dir=./file.json

{
    "title": "Error",
    "errorMessage": "Internal error",
    "errorDescription": "Not a directory"
}
Get the content of a file
/api/fileContent.json?fileName=<fileName>

Returns the content of the specified file.

Note: Your access level must be SUPERUSER.

Example:

/api/fileContent.json?dir=./config.json

{
    "content": "{}"
}

On any error, an error object is returned.

Example:

/api/fileContent.json?dir=./boards

{
    "title": "Error",
    "errorMessage": "Internal error",
    "errorDescription": "Not a file"
}

Clone this wiki locally