📡 API Endpoints
This documentation page (HTML or JSON based on Accept header)
Health check endpoint with system metrics and service status
{
"status": "healthy",
"uptime": 367979,
"services": {
"api": "up",
"qdrant": "up"
},
"version": "1.0.0"
}
Prometheus-compatible metrics for monitoring
Semantic search across embedded documents
// Request
curl -X POST https://star-ai-mcp-rag.testapp.ca/api/search \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_API_KEY" \
-d '{
"query": "search query here",
"limit": 5
}'
// Response
{
"results": [
{
"id": "doc-uuid",
"score": 0.95,
"payload": {
"text": "matched content...",
"source": "document.txt"
}
}
],
"count": 5
}
Get collection statistics and document count
MCP-compatible search endpoint for tool integrations
🔐 Authentication
All protected endpoints require an API key. Include it in your request headers:
// Method 1: Token format (recommended)
Authorization: Token YOUR_API_KEY
// Method 2: Bearer format
Authorization: Bearer YOUR_API_KEY
// Method 3: Custom header
X-API-Key: YOUR_API_KEY
Public endpoints (no authentication required): /health, /metrics, /
💡 Examples
Semantic Search
curl -X POST https://star-ai-mcp-rag.testapp.ca/api/search \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_API_KEY" \
-d '{
"query": "How do I deploy to production?",
"limit": 3,
"threshold": 0.75
}'
MCP Tool Call
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "rag_search",
"arguments": {
"query": "deployment guide",
"limit": 5
}
},
"id": 1
}