MATIH Platform is in active MVP development. Documentation reflects current implementation status.
14. Context Graph & Ontology
API Reference
API Reference Overview

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

PageDescription
Search EndpointsUnified search, semantic search, graph traversal, suggestions
Analytics EndpointsModel performance, path analysis, cost breakdown, latency
Thinking EndpointsThinking trace CRUD, similarity search, trace comparison

Endpoint Summary

GroupEndpoint CountBase Path
Search11 endpoints/api/v1/context-graph/search/
Analytics4 endpoints/api/v1/context-graph/analytics/
Thinking6 endpoints/api/v1/context-graph/thinking/

Common Response Codes

CodeDescription
200Successful request
400Invalid request parameters
401Missing or invalid authentication
403Insufficient permissions
404Resource not found
429Rate limit exceeded
500Internal server error

Rate Limiting

Context Graph endpoints are subject to rate limiting per tenant:

Endpoint GroupRate Limit
Search100 requests per minute per tenant
Analytics30 requests per minute per tenant
Thinking60 requests per minute per tenant