- Add comprehensive documentation in botbook/ with 12 chapters - Add botapp/ Tauri desktop application - Add botdevice/ IoT device support - Add botlib/ shared library crate - Add botmodels/ Python ML models service - Add botplugin/ browser extension - Add botserver/ reorganized server code - Add bottemplates/ bot templates - Add bottest/ integration tests - Add botui/ web UI server - Add CI/CD workflows in .forgejo/workflows/ - Add AGENTS.md and PROD.md documentation - Add dependency management scripts (DEPENDENCIES.sh/ps1) - Remove legacy src/ structure and migrations - Clean up temporary and backup files |
||
|---|---|---|
| .. | ||
| assets | ||
| admin-api.md | ||
| ai-api.md | ||
| analytics-api.md | ||
| backup-api.md | ||
| calendar-api.md | ||
| calls-api.md | ||
| compilation.md | ||
| compliance-api.md | ||
| conversations-api.md | ||
| document-processing.md | ||
| email-api.md | ||
| examples.md | ||
| external-apis.md | ||
| files-api.md | ||
| get-integration.md | ||
| group-membership.md | ||
| groups-api.md | ||
| llm-rest-server.md | ||
| mcp-format.md | ||
| ml-api.md | ||
| monitoring-api.md | ||
| notifications-api.md | ||
| nvidia-gpu-setup.md | ||
| openai-format.md | ||
| opensource-components.md | ||
| param-declaration.md | ||
| README.md | ||
| reports-api.md | ||
| security-api.md | ||
| storage-api.md | ||
| tasks-api.md | ||
| tool-definition.md | ||
| user-security.md | ||
| users-api.md | ||
| whiteboard-api.md | ||
Chapter 8: REST API & Tools
HTTP API endpoints for integrating with botserver.
Overview
botserver exposes REST endpoints organized by functional area. All endpoints follow consistent patterns for authentication, pagination, and error handling.
Base URL
http://localhost:8000/api/v1
Authentication
Authorization: Bearer <token>
API Categories
| Category | Prefix | Description |
|---|---|---|
| User APIs | /api/user/* |
Personal settings, profile, preferences |
| Admin APIs | /api/admin/* |
Organization management (requires admin role) |
| Files | /files/* |
Drive operations |
| Chat | /chat/* |
Conversations and messages |
User vs Admin Endpoints
The API separates user-level and admin-level operations:
User Endpoints (/api/user/*):
- Personal profile and settings
- User's own files and data
- Individual preferences
- Accessible by all authenticated users
Admin Endpoints (/api/admin/*):
- Organization-wide settings
- User management
- Group management
- DNS, billing, audit logs
- Requires
adminrole
Quick Example
curl -X POST http://localhost:8000/api/v1/chat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Hello", "session_id": "abc123"}'
Response Format
{
"success": true,
"data": { ... },
"error": null
}
Chapter Contents
- Files API - Upload/download
- Document Processing - Text extraction
- Users API - User management
- User Security API - 2FA, sessions
- Groups API - Group management
- Conversations API - Chat sessions
- Calendar API - Scheduling
- Tasks API - Task management
- Storage API - Object storage
- Analytics API - Metrics
- Admin API - Administration
- AI API - LLM endpoints
- Example Integrations - Code samples
See Also
- LLM Tools - Tool definitions
- Authentication - Security
- Permissions Matrix - Access control