Endpoint
Authentication
Requires Bearer token authentication via theAuthorization header.
Path Parameters
The UUID of the server
Query Parameters
The directory path to list (relative to server root). Defaults to root directory if not specified.
Response
Returns an array of file stat objects.The name of the file or directory
Unix file mode as a string
Unix file mode in octal notation
Size of the file in bytes
Whether this entry is a file
Whether this entry is a symbolic link
MIME type of the file (detected by file extension)
ISO 8601 timestamp of file creation
ISO 8601 timestamp of last modification
Example Request
Example Response
Behavior
- Files are sorted with directories first, then files alphabetically
- Path traversal is prevented - attempts to access paths outside the server directory will fail
- The directory path is relative to the server’s root directory
- Symlinks are resolved but marked with
is_symlink: true - Hidden files (starting with
.) are included in the listing
Error Responses
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
Server does not exist or directory not found
500 Internal Server Error
500 Internal Server Error
Failed to read directory contents
Source Reference
Implementation:router/router_server_files.go:78-86