Ls

List the content of a specified folder. This grabs the actual content from a node, so the returned list may vary depending on the node that was used and if all nodes are fully synchronized.

Request

POST https://api.cloudplan.biz/api/folder/ls

{
    "node_id":"..."                 (string, optional)
    "folder_id":"..."               (string, optional) id of the folder to list content for
    "number": 20                    (integer, optional) default 20 - max-number of entries to return
    "skip": 0                       (integer, optional) default 0 - number of entries to skip
    "sort_modified": true/false     (bool, optional) default sort by name
    "sort_size":  true/false        (bool, optional) default sort by name
    "sort_invert":  true/false      (bool, optional) default sort by name
    "admin": true/false             (bool, optional) default false
}

Reply

{
    "result": true/false
    "folder_id": ...
    "user_rights": ['read', ..] # user rights for current top level folder
    "folder_name": ...
    "skip": ...
    "number": ...
    "folder_content": [
        "cp_id": ...
        "name": ...
        "type": "file"/"folder"
        "changed_by": ...
        "create": ...
        "modified": ...
        "size": ...
    ]
}

Error Codes

folder_id_empty
folder_not_found
root_folder_not_found
no_storage_node_online
user_has_no_access
node_error

error codes from :doc:`api/user/login`