Overview
The Workspace Files API exposes filesystem operations for the packaged Allternit Platform app. It resolves paths against the user’s home directory (supporting the~ shorthand) and sandboxes requests through a caller identity derived from the auth header. This API is the HTTP fallback used when the desktop preload does not expose direct filesystem access.
Base URL
Authentication
Requests are authorized through the platform auth middleware. The route also accepts a desktop-bootstrap header as a lenient fallback so Electron desktop sessions can operate without requiring the middleware to populate anAuthUser extension.
Endpoints
Path resolution
All paths are resolved relative to the caller’s home directory:~/Projects/appresolves to<home>/Projects/app./absolute/pathis used as-is.relative/pathresolves to<home>/relative/path.
List files
Query parameters
Response
entries array rather than an error.
Read a text file
Response
Read a raw file
Content-Type header.
Check existence
JSON variant (always returns 200):Response
200 OK if the path exists, otherwise 404 Not Found.
Create a directory
Response
Delete a file or directory
Response
Write a file
Response
Supported MIME types
The/files/raw endpoint detects the following common types from the file extension:
Error codes
Related pages
- Files — upload and reference files for LLM requests
- Agent Workspaces — workspace directories and paths
- ACI — computer-interface filesystem actions