Skip to main content
Version: 0.0.41

LHC Core API

The LHC Core API is the central management API for the Lakehousecat platform. It covers user and group management, model configuration, prompt templates, and authentication.

Base URL: http://<host>:42021

What you can do​

  • Manage users and groups (create, update, delete, assign roles)
  • Configure custom and provider models
  • Manage prompt templates and prompt groups
  • Assign data sources, models, and job definitions to users or groups
  • Handle authentication and API key management
  • Access audit logs

Authentication​

All endpoints require a Bearer token. Generate your API key in the Lakehousecat UI:

Account Settings → Security → API Keys → Generate API Key

Authorization: Bearer <your-api-key>

Quick Start​

List all models​

curl -X GET "http://localhost:42021/api/v1/lhc/models" \
-H "Authorization: Bearer <your-api-key>"
import requests

BASE_URL = "http://localhost:42021"
HEADERS = {"Authorization": "Bearer <your-api-key>"}

response = requests.get(f"{BASE_URL}/api/v1/lhc/models", headers=HEADERS)
models = response.json()

List all groups​

curl -X GET "http://localhost:42021/api/v1/lhc/groups" \
-H "Authorization: Bearer <your-api-key>"
response = requests.get(f"{BASE_URL}/api/v1/lhc/groups", headers=HEADERS)
groups = response.json()

Add a user to a group​

curl -X POST "http://localhost:42021/api/v1/lhc/usergroups" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"user_id": "user-123", "group_id": "group-456"}'
response = requests.post(
f"{BASE_URL}/api/v1/lhc/usergroups",
json={"user_id": "user-123", "group_id": "group-456"},
headers=HEADERS,
)

Assign a model to a group​

curl -X POST "http://localhost:42021/api/v1/lhc/modelgroups" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"model_id": "model-789", "group_id": "group-456"}'
response = requests.post(
f"{BASE_URL}/api/v1/lhc/modelgroups",
json={"model_id": "model-789", "group_id": "group-456"},
headers=HEADERS,
)

List audit logs​

curl -X GET "http://localhost:42021/api/v1/lhc/audit-logs" \
-H "Authorization: Bearer <your-api-key>"
response = requests.get(f"{BASE_URL}/api/v1/lhc/audit-logs", headers=HEADERS)
logs = response.json()

Endpoint Groups​

The LHC Core API covers the following resource groups:

ResourcePathDescription
Users/api/v1/lhc/usersUser lifecycle management
Groups/api/v1/lhc/groupsGroup management
User Groups/api/v1/lhc/usergroupsAssign users to groups
Models/api/v1/lhc/modelsModel configuration
Model Groups/api/v1/lhc/modelgroupsAssign models to groups
Model Users/api/v1/lhc/modelusersAssign models to users
Prompts/api/v1/lhc/promptsPrompt template management
Prompt Groups/api/v1/lhc/promptgroupsAssign prompts to groups
Jobs/api/v1/lhc/jobsJob execution
Audit Logs/api/v1/lhc/audit-logsPlatform audit trail
Authentication/api/v1/lhc/authsAuth and API key management

Dependency Order​

When setting up a new environment programmatically, follow this order:

  1. Create groups (/groups)
  2. Create or invite users (/users)
  3. Assign users to groups (/usergroups)
  4. Configure models (/models)
  5. Assign models to groups or users (/modelgroups, /modelusers)
  6. Configure prompts and assign them (/prompts, /promptgroups)

UI Equivalent​

Most operations in this API correspond directly to the Administration section of the Lakehousecat UI (user management, model configuration, group assignments).