πŸš€ RAG Backend API

Complete API orchestration for projects, sources, schedules, and LLM responses

Checking…

RAG Backend API Documentation

Complete API for managing projects, data sources, URL schedules, crawls, and LLM responses.

⚠️ Authentication Required: Most endpoints require Keycloak authentication. Use the Authentication API section to login first.

Core Features

πŸ” Authentication API (Start Here)

OAuth/Keycloak authentication endpoints - Login first to access other APIs

GET /api/auth/login Initiate OAuth login with Keycloak
GET /api/auth/callback OAuth callback (handled automatically)
GET /api/auth/me Get current user info
GET /api/auth/session Check session status
POST /api/auth/logout Logout user

πŸ“¦ Projects API

Manage RAG projects and their metadata

GET /api/projects List all projects
POST /api/projects Create a new project (requires auth)
GET /api/projects/{uuid} Get specific project by UUID
PUT /api/projects/{uuid} Update project metadata
DELETE /api/projects/{uuid} Delete project
GET /api/projects/{uuid}/documents Get project documents from VectorDB
GET /api/projects/{uuid}/stats Get project statistics

πŸ“₯ Data Sources API

Upload and manage various data source types

POST /api/sources/text Upload text content (requires auth)
POST /api/sources/website Upload website URL to crawl
POST /api/sources/sitemap Upload sitemap URL
POST /api/sources/url-list Upload multiple URLs
POST /api/sources/faq Upload FAQ pairs
POST /api/sources/document Upload documents (multipart/form-data)

πŸ•’ URL Schedules API

Manage scheduled URL crawls and triggers

POST /api/url-schedules Create/update URL schedule
GET /api/url-schedules/{project} Get project schedules (name or UUID)
PUT /api/url-schedules/{project}/{url} Update specific schedule
DELETE /api/url-schedules/{project}/{url} Delete schedule
POST /api/url-schedules/{uuid}/trigger-now Trigger immediate crawl
GET /api/url-schedules/scheduler/status Get scheduler status

πŸ”„ URL Manager API

Manage crawl sessions and URL tracking

POST /api/url-manager/sessions/{job_id} Create crawl session
PUT /api/url-manager/sessions/{job_id}/urls Update crawl URLs
POST /api/url-manager/sessions/{job_id}/complete Complete crawl
GET /api/url-manager/projects/{project}/jobs Get project crawl jobs (name or UUID)
GET /api/url-manager/projects/{project}/urls Get project selected URLs
GET /api/url-manager/projects/{project}/summary Get project crawl summary

πŸ€– LLM Responses API

Store and manage LLM interactions

POST /api/llm-responses Store LLM response
GET /api/llm-responses List LLM responses with filters
GET /api/llm-responses/{id} Get specific response

πŸ”§ Other Services

Additional API endpoints and utilities

GET /api/health Health check (database + services)
GET /api/users List users (requires auth)
GET /api/services List registered services
POST /api/webhooks/crawl-complete Crawl completion webhook
ANY /api/proxy/{service}/{path} Proxy to backend services (vectordb, webcrawler, etc.)
πŸ’‘ Testing Tips: