RAG-DocBot exposes a RESTful HTTP API. Interactive documentation (Swagger UI) is available at http://<host>:8000/docs.
Endpoints
Health
| Method | Endpoint | Auth | Description |
|---|
GET | /api/health | Public | Returns service health status |
Authentication
| Method | Endpoint | Auth | Description |
|---|
POST | /api/auth/login | Public | Login and receive access + refresh tokens |
POST | /api/auth/refresh | Public | Exchange a refresh token for a new access token |
GET | /api/auth/me | Required | Get the current authenticated user |
GET | /api/auth/users | Admin | List all users |
POST | /api/auth/users | Admin | Create a new user |
GET | /api/auth/users/{id} | Admin | Get a specific user |
PUT | /api/auth/users/{id} | Admin | Update a user's password or role |
DELETE | /api/auth/users/{id} | Admin | Delete a user |
PUT | /api/auth/password | Required | Change the current user's password |
Chat
| Method | Endpoint | Auth | Description |
|---|
POST | /api/chat | Required | Send a message and receive an AI response grounded in indexed documents |
Documents
| Method | Endpoint | Auth | Description |
|---|
POST | /api/docs/upload | Editor+ | Upload a document for indexing |
GET | /api/docs | Required | List all indexed documents |
DELETE | /api/docs/{id} | Editor+ | Delete a document |
DELETE | /api/docs/bulk | Editor+ | Delete multiple documents |
Connectors
| Method | Endpoint | Auth | Description |
|---|
GET | /api/connectors | Required | List connectors |
POST | /api/connectors | Admin | Create a connector |
GET | /api/connectors/{id} | Required | Get a connector |
PUT | /api/connectors/{id} | Admin | Update a connector |
DELETE | /api/connectors/{id} | Admin | Delete a connector |
POST | /api/connectors/{id}/scan | Editor+ | Trigger a connector scan |
POST | /api/connectors/sync-all | Editor+ | Sync all connectors |
Index
| Method | Endpoint | Auth | Description |
|---|
GET | /api/index/stats | Required | View vector index statistics |
POST | /api/index/rebuild | Editor+ | Rebuild the entire vector index |
Jobs
| Method | Endpoint | Auth | Description |
|---|
GET | /api/jobs | Required | List background jobs |
GET | /api/jobs/{id} | Required | Get a specific job |
POST | /api/jobs/{id}/cancel | Editor+ | Cancel a running job |
Integrations
| Method | Endpoint | Auth | Description |
|---|
GET | /api/integrations | Required | List integrations |
POST | /api/integrations | Admin | Create an integration |
GET | /api/integrations/{id} | Required | Get an integration |
PUT | /api/integrations/{id} | Admin | Update an integration |
DELETE | /api/integrations/{id} | Admin | Delete an integration |
POST | /api/integrations/{id}/sync | Editor+ | Trigger an integration sync |
Conversations
| Method | Endpoint | Auth | Description |
|---|
GET | /api/conversations | Required | List conversations |
GET | /api/conversations/{id} | Required | Get a specific conversation |
Branding
| Method | Endpoint | Auth | Description |
|---|
GET | /api/branding | Public | Get branding configuration |
GET | /api/branding/logo | Public | Get branding logo |
PUT | /api/branding | Admin | Update branding configuration |
POST | /api/branding/logo | Admin | Upload a branding logo |
License
| Method | Endpoint | Auth | Description |
|---|
GET | /api/license | Required | Get license information and current plan |
POST | /api/license | Admin | Apply or update the license key |
Hardware & Model
| Method | Endpoint | Auth | Description |
|---|
GET | /api/hardware | Required | Get hardware information (CPU, GPU, memory) |
GET | /api/model-info | Required | Get loaded model information |
Interactive API Docs
Swagger UI is available at http://<host>:8000/docs and provides a full interactive reference with request/response schemas and the ability to test endpoints directly in the browser.