Skip to main content
Use this endpoint to inspect the contents of a directory inside a running capsule. Each entry in the response includes the name, type, size, permissions, and last modification time. You can control how deep the listing recurses using the depth parameter.

Endpoint

Authentication

string
required
Your team’s API key. Pass the full wrn_... key value.

Path parameters

string
required
The ID of the capsule to list files in. The capsule must be in the running state.

Request body

string
required
Absolute path to the directory inside the capsule, e.g. "/home/user".
integer
default:"1"
Recursion depth for the listing. 0 returns only the directory itself (non-recursive); 1 returns its immediate children. Higher values recurse further into subdirectories.

Example request

Response

Returns 200 OK with a JSON object containing an entries array.
object[]
Array of file and directory entries found at the specified path.

Example response

Python SDK

Error responses