API Reference Overview
The Context Graph exposes three groups of REST API endpoints: search endpoints for querying the knowledge graph, analytics endpoints for agent performance analysis, and thinking endpoints for accessing agent reasoning traces. All endpoints are RBAC-protected and tenant-scoped.
Base URL
All Context Graph endpoints are served under the AI Service at port 8000:
https://{tenant}.matih.ai/api/v1/context-graph/Authentication
All endpoints require a valid JWT token in the Authorization header:
Authorization: Bearer {jwt_token}The tenant context is extracted from the JWT claims. Data is scoped to the authenticated tenant.
Subsections
| Page | Description |
|---|---|
| Search Endpoints | Unified search, semantic search, graph traversal, suggestions |
| Analytics Endpoints | Model performance, path analysis, cost breakdown, latency |
| Thinking Endpoints | Thinking trace CRUD, similarity search, trace comparison |
Endpoint Summary
| Group | Endpoint Count | Base Path |
|---|---|---|
| Search | 11 endpoints | /api/v1/context-graph/search/ |
| Analytics | 4 endpoints | /api/v1/context-graph/analytics/ |
| Thinking | 6 endpoints | /api/v1/context-graph/thinking/ |
Common Response Codes
| Code | Description |
|---|---|
| 200 | Successful request |
| 400 | Invalid request parameters |
| 401 | Missing or invalid authentication |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Rate Limiting
Context Graph endpoints are subject to rate limiting per tenant:
| Endpoint Group | Rate Limit |
|---|---|
| Search | 100 requests per minute per tenant |
| Analytics | 30 requests per minute per tenant |
| Thinking | 60 requests per minute per tenant |