Implementation:TobikoData Sqlmesh API Modules
| Knowledge Sources | |
|---|---|
| Domains | Web_Server, REST_API |
| Last Updated | 2026-02-07 20:00 GMT |
Overview
Concrete tool for retrieving enabled server modules provided by the SQLMesh web server.
Description
This module exposes a FastAPI endpoint that returns the list of enabled modules for the server instance. Modules control which features are available in the web UI, such as plans, files, models, and other capabilities. The module configuration determines which API endpoints and UI components are activated.
Usage
This endpoint is called by the SQLMesh web UI during initialization to determine which features to enable. The UI uses the module list to show or hide navigation items, enable or disable functionality, and configure the available user interface components.
Code Reference
Source Location
- Repository: TobikoData_Sqlmesh
- File: web/server/api/endpoints/modules.py
Signature
@router.get(
"",
response_model=t.List[models.Modules],
response_model_exclude_unset=True,
)
def get_api_modules(
settings: Settings = Depends(get_settings),
) -> t.List[models.Modules]
Import
from web.server.api.endpoints.modules import router
I/O Contract
Inputs
| Endpoint | Method | Parameters | Description |
|---|---|---|---|
| /api/modules | GET | None | Retrieves list of enabled modules |
Outputs
| Endpoint | Response Type | Description |
|---|---|---|
| /api/modules | List[Modules] | Array of enabled module names |
Usage Examples
# Get enabled modules
import httpx
response = httpx.get("http://localhost:8000/api/modules")
modules = response.json()
# ["plans", "files", "models", "tests", "docs"]
# Check if specific module is enabled
modules = httpx.get("http://localhost:8000/api/modules").json()
if "plans" in modules:
print("Plan functionality is available")