Leap0

List directory contents

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

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

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

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

path*string

Directory path to list.

recursive?boolean

List contents recursively.

Defaultfalse
exclude?array<string>

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

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/filesystem/ls" \  -H "Content-Type: application/json" \  -d '{    "path": "/home/user"  }'
{  "items": [    {      "name": "string",      "path": "string",      "is_dir": true,      "size": 0,      "mode": "string",      "mtime": 0,      "owner": "string",      "group": "string",      "is_symlink": true,      "link_target": "string"    }  ]}
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}
{  "message": "string"}