Skip to main content
Two endpoints let you manage the structure of a capsule’s filesystem: one for creating directories and one for removing files or directories. Both require the capsule to be in the running state.

Create a directory

Creates a directory at the specified path inside the capsule. Intermediate directories are created as needed (equivalent to mkdir -p).

Authentication

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

Path parameters

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

Request body

string
required
Absolute path of the directory to create inside the capsule, e.g. "/app/data".

Example request

Response

Returns 200 OK with a FileEntry object describing the created directory.
object
The created directory entry.

Example response


Remove a file or directory

Removes a file or directory at the specified path inside the capsule. Removal is recursive for directories — all contents are deleted.
This operation is irreversible. Entire directory trees are removed without confirmation. Make sure you have a copy of any data you need before calling this endpoint.

Authentication

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

Path parameters

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

Request body

string
required
Absolute path to the file or directory to remove, e.g. "/app/old".

Example request

Response

Returns 204 No Content on success. No body is returned.

Python SDK

remove works recursively for directories. There is no rmdir-style safe guard — it behaves like rm -rf.

Error responses