List a mount's files
List every file and folder in a mount.
GET
/api/v1/mounts/:mountId/filesconst response = await fetch("https://api.smallworld.sh/api/v1/mounts/0199a1c4-5b6e-7a10-9c2d-3e4f5a6b7c8d/files", {
method: "GET",
headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Path parameters#
mountIdUUIDrequiredThe mount's ID, returned as id when the mount was created.
Responses#
Returns items, sorted by path, without a pagination cursor. Each entry has path (inside the mount, starting with a slash), type (file or directory), size in bytes, hash (the SHA-256 of the content in hex, empty for folders), and modifiedAt.
{
"items": [
{
"path": "/faq.md",
"type": "file",
"size": 37,
"hash": "e08222b5163270229c47f385e4d0e8a9de482f71d0364a66de787c09b3b63b0a",
"modifiedAt": "2026-10-10T12:00:01.000Z"
},
{
"path": "/guides",
"type": "directory",
"size": 0,
"hash": "",
"modifiedAt": "2026-10-10T12:00:00.000Z"
},
{
"path": "/guides/refunds.md",
"type": "file",
"size": 54,
"hash": "634c0a73f251b5ddb65b10d686a52dd334acbd4674768b96a36499dcb1818fca",
"modifiedAt": "2026-10-10T12:00:00.000Z"
}
]
}
More about this endpoint
Paths are inside the mount: /faq.md in a mount at /workspace/docs is /workspace/docs/faq.md in the terminal.
Folders are listed too, including empty ones. Read a file's content with GET /mounts/:mountId/files/content.