API Reference

Laravel API

REST API endpoints served by the Laravel 12 backend.

The Laravel API serves as the gateway between the Nuxt frontend and the backend services (Agno, Dify, PostgreSQL). All endpoints require Sanctum session authentication unless noted.

Authentication

MethodPathAuthPurpose
POST/api/v1/auth/loginNoEmail/password login
POST/api/v1/auth/logoutYesEnd session
POST/api/v1/auth/forgot-passwordNoPassword reset email
POST/api/v1/auth/reset-passwordNoReset with token

Agent Queries

MethodPathAuthPurpose
POST/api/v1/agent/queryYesSubmit natural language question → proxies to Agno POST /query
POST/api/v1/agent/contextYesDashboard element click → proxies to Agno POST /context
POST/api/v1/agent/extractAdminTrigger document extraction → proxies to Agno POST /extract
GET/api/v1/agent/extract/status/{id}AdminPoll extraction status → proxies to Agno GET /extract/status/{id}

Semantic Model (Admin)

MethodPathPurpose
GET/api/v1/semantic/entitiesList entities
POST/api/v1/semantic/entitiesCreate entity
PUT/api/v1/semantic/entities/{id}Update entity
DELETE/api/v1/semantic/entities/{id}Delete entity
GET/POST/PUT/DELETE/api/v1/semantic/metrics/*Metric CRUD
GET/POST/PUT/DELETE/api/v1/semantic/dimensions/*Dimension CRUD
GET/POST/PUT/DELETE/api/v1/semantic/vocabulary/*Vocabulary CRUD
POST/api/v1/semantic/schema/refreshRegenerate schema_context

Widgets & Dashboards

MethodPathPurpose
GET/api/v1/dashboardsList dashboards for current user's role
POST/api/v1/dashboardsCreate dashboard (admin)
PUT/api/v1/dashboards/{id}Update dashboard (admin)
DELETE/api/v1/dashboards/{id}Delete dashboard (admin)
GET/POST/PUT/DELETE/api/v1/widgets/*Widget CRUD (admin)
POST/api/v1/widgets/renderRender widget data → proxies to Agno POST /widget/render
GET/api/v1/widgets/suggestSuggest widgets from semantic model (admin)

LLM Routing (Admin)

MethodPathPurpose
GET/api/v1/admin/llm-routingList all routes
PUT/api/v1/admin/llm-routing/{id}Update route (provider, model, etc.)
POST/api/v1/admin/llm-routing/{id}/toggleToggle route active/inactive

Knowledge

MethodPathPurpose
GET/api/v1/knowledge/sourcesList knowledge sources
POST/api/v1/knowledge/sourcesCreate knowledge source
POST/api/v1/knowledge/uploadUpload document → MinIO → Dify indexing
DELETE/api/v1/knowledge/sources/{id}Delete source
POST/api/v1/knowledge/syncTrigger re-index of all sources

Goals & Notifications

MethodPathPurpose
GET/api/v1/goalsList active goals
POST/api/v1/goalsCreate goal (admin)
PUT/api/v1/goals/{id}Update goal (admin)
GET/api/v1/notificationsList current user's notifications
PUT/api/v1/notifications/{id}/readMark notification as read

Response Format

All endpoints return JSON. Success responses use appropriate HTTP status codes (200, 201). Error responses:

{
  "message": "Human-readable error description",
  "errors": {
    "field": ["Validation message"]
  }
}

Rate limiting applies per endpoint (configurable via UBIOS_RATE_LIMIT_* env vars).