Skip to main content
POST
/
filesystem.Filesystem
/
ListDir
ListDir
curl --request POST \
  --url https://{port}-{sandboxID}.e2b.app/filesystem.Filesystem/ListDir \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Token: <api-key>' \
  --data '
{
  "path": "<string>",
  "depth": 123
}
'
{
  "entries": [
    {
      "name": "<string>",
      "type": "FILE_TYPE_UNSPECIFIED",
      "path": "<string>",
      "size": 123,
      "mode": 123,
      "permissions": "<string>",
      "owner": "<string>",
      "group": "<string>",
      "modifiedTime": "2023-11-07T05:31:56Z",
      "symlinkTarget": "<string>"
    }
  ]
}

Authorizations

X-Access-Token
string
header
required

Sandbox access token (envdAccessToken) for authenticating requests to a running sandbox. Returned by: POST /sandboxes (on create), POST /sandboxes/{sandboxID}/connect (on connect), POST /sandboxes/{sandboxID}/resume (on resume), and GET /sandboxes/{sandboxID} (for running or paused sandboxes).

Headers

Connect-Protocol-Version
number
required

Define the version of the Connect protocol

Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json
path
string
depth
integer

Response

Success

entries
EntryInfo · object[]