botserver/web/desktop/REST_API.md
Rodrigo Rodriguez (Pragmatismo) d0563391b6 ``` Add comprehensive email account management and user settings
interface

Implements multi-user authentication system with email account
management, profile settings, drive configuration, and security
controls. Includes database migrations for user accounts, email
credentials, preferences, and session management. Frontend provides
intuitive UI for adding IMAP/SMTP accounts with provider presets and
connection testing. Backend supports per-user vector databases for email
and file indexing with Zitadel SSO integration and automatic workspace
initialization. ```
2025-11-21 09:28:35 -03:00

1.1 KiB

Drive REST API Integration

Endpoints

GET /files/list

List files and folders in S3 bucket Query params: bucket (optional), path (optional) Response: [{ name, path, is_dir, icon }]

POST /files/read

Read file content Body: { bucket, path } Response: { content }

POST /files/write

Write file content Body: { bucket, path, content } Response: { success: true }

POST /files/delete

Delete file/folder Body: { bucket, path } Response: { success: true }

POST /files/create-folder

Create new folder Body: { bucket, path, name } Response: { success: true }

Integration

  1. Add to main.rs:
mod drive;

.configure(drive::configure)
  1. Frontend calls:
fetch('/files/list?bucket=mybucket')
fetch('/files/read', { method: 'POST', body: JSON.stringify({ bucket, path }) })
fetch('/files/write', { method: 'POST', body: JSON.stringify({ bucket, path, content }) })

S3 Backend

Uses existing FileTree from ui_tree/file_tree.rs Wraps S3 operations: list_buckets, list_objects_v2, get_object, put_object, delete_object