The list-files command is used to retrieve a list of files and folders from a repository.

JSON Input Data Format
{
    "id": string,
    "branch": string,
    "path": string
}
id * Specifies the ID of the repository.
branch Specifies the branch name of the repository, which defaults to "main".
path Specifies the path to retrieve files and folders from, which defaults to "/".
* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.


Successful Response
{
    "result": "OK",
    "payload": [
        {
            "name": "db/",
            "type": "folder"
        },
        {
            "name": "master-compose.yaml",
            "type": "file"
        },
        {
            "name": "worker-compose.yaml",
            "type": "file"
        },
        ...
    ]
}

Failed Response
{
    "result": "ERR",
    "message": "Error message ..."
}