Skip to content

API Reference

Last verified: v2.0

Auto-generated documentation

This reference is auto-generated from MEHO's OpenAPI specification. To regenerate with the latest API changes, run the app and export:

curl -s http://localhost:8000/openapi.json > docs/openapi.json

MEHO exposes a RESTful API built with FastAPI. All endpoints require Keycloak JWT authentication unless otherwise noted. The API follows standard HTTP conventions: JSON request/response bodies, proper status codes, and consistent error formats.

Authentication

All API requests require a valid Keycloak JWT bearer token in the Authorization header:

Authorization: Bearer <access_token>

Tokens are obtained through the Keycloak OIDC flow. The frontend handles this automatically via keycloak-js. For direct API access, use the Keycloak token endpoint:

curl -X POST "http://localhost:8080/realms/example-tenant/protocol/openid-connect/token" \
  -d "grant_type=password" \
  -d "client_id=meho-frontend" \
  -d "username=YOUR_USER" \
  -d "password=YOUR_PASSWORD"

Base URL

Environment URL
Local development http://localhost:8000
Interactive docs (Swagger) http://localhost:8000/docs
OpenAPI spec (JSON) http://localhost:8000/openapi.json

API Groups

The API is organized into the following groups:

Group Prefix Description
Chat /api/chat Session management, message sending, SSE streaming
Connectors /api/connectors Connector CRUD, operations, test connection
Knowledge /api/knowledge Document upload, search, knowledge base management
Topology /api/topology Entity graph, resolution, auto-discovery
Memory /api/memory Agent memory entries, extraction history
Ingestion /api/ingestion Document processing jobs, status tracking
Health /health Service health check (no auth required)

Specification

MEHO API 2.0.0

AI-powered diagnostic and operations platform for complex IT environments.

This is a placeholder spec. To generate the full specification with all endpoints, start the MEHO backend and run:

curl -s http://localhost:8000/openapi.json > docs/openapi.json

Contact: evoila

Servers

Description URL
Local development http://localhost:8000

Health


GET /health

Health Check

Description

Returns service health status. No authentication required.

Responses

{
    "status": "healthy"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "status": {
            "type": "string",
            "example": "healthy"
        }
    }
}

Chat


GET /api/chat/sessions

List Chat Sessions

Description

Returns all chat sessions for the authenticated user.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token

Responses


POST /api/chat/sessions

Create Chat Session

Description

Creates a new chat session.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token

Responses


POST /api/chat/sessions/{session_id}/messages

Send Message

Description

Sends a message to a chat session and triggers the agent investigation. Returns a streaming SSE response.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token
session_id path string No

Responses

Connectors


GET /api/connectors

List Connectors

Description

Returns all connectors for the authenticated tenant.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token

Responses

Knowledge


POST /api/knowledge/search

Search Knowledge Base

Description

Performs hybrid search (BM25 + semantic) across the knowledge base.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token

Responses

Topology


GET /api/topology/entities

List Topology Entities

Description

Returns discovered topology entities with their cross-system relationships.

Input parameters

Parameter In Type Default Nullable Description
bearerAuth header string N/A No Keycloak JWT access token

Responses


Security schemes

Name Type Scheme Description
bearerAuth http bearer Keycloak JWT access token