Skip to content

List directory contents

POST
/v1/sandbox/{sandboxID}/filesystem/ls

List files and directories at the given path inside the sandbox.

sandboxID
required
string

Unique sandbox identifier.

object
path
required

Directory path to list.

string
Example
/home/user
recursive

List contents recursively.

boolean
exclude

Glob patterns to exclude (e.g. node_modules, .git).

Array<string>

Directory listing.

object
items
required

List of file and directory entries.

Array<object>
object
name
required

File or directory name.

string
path
required

Full path.

string
is_dir
required

Whether this entry is a directory.

boolean
size
required

File size in bytes.

integer format: uint64
mode
required

Octal permission string (e.g. 755).

string
mtime
required

Last modification time as Unix timestamp (seconds).

integer format: int64
owner
required

File owner.

string
group
required

File group.

string
is_symlink
required

Whether this entry is a symbolic link.

boolean
link_target

Target path if this entry is a symbolic link.

string

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string

Resource not found.

object
message
required

Human-readable error message.

string