Expand description
HTTP API handlers and routes. HTTP API Handlers and Routes
This module provides the REST API layer for A.R.E.S, built on the Axum web framework.
§Module Structure
api::handlers- Request handlers for each endpointapi::routes- Route definitions and router configuration
§API Endpoints
§Authentication (/api/auth)
POST /api/auth/register- Register new userPOST /api/auth/login- Login and receive JWT token
§Chat (/api/chat)
POST /api/chat- Send message and receive streaming responseGET /api/memory- Get user memory (facts, preferences)
§Conversations (/api/conversations)
GET /api/conversations- List user’s conversationsGET /api/conversations/{id}- Get conversation with messagesPUT /api/conversations/{id}- Update conversation titleDELETE /api/conversations/{id}- Delete conversation
§RAG (/api/rag)
POST /api/rag/ingest- Ingest documents into a collectionPOST /api/rag/search- Search for relevant documentsGET /api/rag/collections- List collectionsDELETE /api/rag/collections/{name}- Delete a collection
§Health (/api/health)
GET /api/health- Health check endpoint
§Authentication
Most endpoints require a valid JWT token in the Authorization header:
Authorization: Bearer <token>§OpenAPI Documentation
When the swagger-ui feature is enabled, interactive API documentation
is available at /swagger-ui/.