Skip to main content
Get a recursive tree view of directory contents, showing the complete hierarchy.

Python SDK

HTTP API

Parameters

string
required
Viking URI of the directory
string
default:"agent"
Output format: original or agent
integer
default:"128"
Abstract limit (only for agent output mode)
boolean
default:"false"
List all hidden files (like ls -a)
integer
default:"1000"
Maximum number of nodes to traverse
integer
default:"3"
Maximum depth level to traverse

Response

Returns a flat array of all entries in the tree, each with a rel_path field showing its position in the hierarchy.
string
File or directory name
integer
Size in bytes
boolean
true if directory, false if file
string
Relative path from the base URI
string
Full Viking URI

CLI

Notes

  • The tree is returned as a flat array, not a nested structure
  • Use rel_path to understand the hierarchy
  • Default level_limit of 3 prevents extremely deep traversals
  • Use node_limit to prevent memory issues with very large directories