Files API
Get File Tree
GET /fs/:uid/tree
Returns the full file tree for a filesystem.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
path |
string | Filter to a specific subtree |
depth |
number | Maximum depth to return |
Response
{
"nodes": [
{
"uid": "node_abc123",
"name": "document.pdf",
"path": "/documents/document.pdf",
"type": "file",
"size": 1048576,
"hash": "sha256:abcdef...",
"updatedAt": "2025-06-15T10:30:00Z"
}
]
}
Upload File
POST /fs/:uid/upload
Upload a file to a filesystem. Files are content-addressed by their SHA-256 hash.
Request Body (multipart/form-data)
| Field | Type | Description |
|---|---|---|
file |
binary | The file content |
path |
string | Destination path in the filesystem |
Download File
GET /fs/:uid/download/:nodeUid
Returns a presigned download URL for the file.
Delete File
DELETE /fs/:uid/tree/:nodeUid
Removes a file or folder from the filesystem.