POST
/
api
/
filesystem
/
tree
curl --request POST \
  --url http://localhost:4242/{computer_name}/api/filesystem/tree \
  --header 'Content-Type: application/json' \
  --data '{
  "include_hidden": false,
  "max_depth": 3,
  "path": "/home/user/project",
  "pattern": "*.py"
}'
{
  "name": "project",
  "type": "directory",
  "children": [
    {
      "name": "src",
      "type": "directory",
      "children": [
        {
          "name": "main.py",
          "type": "file"
        }
      ]
    }
  ]
}

Body

application/json
path
string
required

Root directory path

Example:

"/home/user/project"

max_depth
integer
default:3

Maximum depth to traverse

Required range: x >= 1
Example:

3

include_hidden
boolean
default:false

Whether to include hidden files/directories

Example:

false

pattern
string | null

Glob pattern to filter results

Example:

"*.py"

Response

200
application/json
Successfully generated directory tree

The response is of type object.