Skip to main content

REST API summary

Summary of all REST API endpoints exposed by uxopian-ai. All endpoints are accessible via the gateway at the configured base path. An interactive API explorer (Swagger UI) is available at /swagger-ui/index.html.

Base path

All endpoints use the base path /api/v1. Requests go through the gateway; replace https://your-gateway with your gateway URL.

Error responses

Since 2026.0.0-ft4, every non-2xx response returns a structured JSON body instead of a plain-text message:

{
"code": "LLM_PROVIDER_NOT_FOUND",
"message": "LLM provider 'xyz' not found.",
"status": 404
}
FieldTypeDescription
codestringStable, machine-readable error code
messagestringHuman-readable description
statusnumberHTTP status code (also reflected in the response status line)

Common error codes and their HTTP status:

codeStatusRaised when
BAD_REQUEST400Malformed or invalid request
LLM_BAD_REQUEST400The LLM rejected the request
MISSING_TENANT400No tenant resolved from the request
MISSING_USER400No user resolved from the request
UNAUTHORIZED401Authentication/authorization failed (e.g. requesting an undeployed script)
NOT_FOUND / FILE_NOT_FOUND / RESOURCE_NOT_FOUND404Entity, file, or resource not found
LLM_PROVIDER_NOT_FOUND404Referenced LLM provider does not exist
MCP_SERVER_NOT_FOUND404Referenced MCP server does not exist
NOT_IMPLEMENTED405Operation not supported
CONFLICT409Duplicate entity (e.g. creating an LLM provider or script with an existing ID)
LLM_CAPABILITY_ERROR422The selected model lacks a required capability (multimodal, function calling)
TOOL_CYCLES_EXCEEDED422The tool-calling loop exceeded its maximum number of cycles
SCAN_CONFIGURATION_ERROR422The script security scan is not configured
OPENSEARCH_UNAVAILABLE503OpenSearch is unreachable
INTERNAL_ERROR500Unhandled server error
Migrating from a previous version

Clients that previously parsed the plain-text error body must now read the message field from the JSON object. Some statuses also changed — notably, creating a duplicate LLM provider now returns 409 Conflict (previously 400).

User endpoints

Requests — /api/v1/requests

MethodPathDescription
POST/api/v1/requestsSend one or more requests in a conversation. Returns the request with the LLM response.
POST/api/v1/requests/streamSend a request and stream the response (used by the chat and Quick Prompt).
POST/api/v1/requests/retry/streamRetry a request and stream the response.
GET/api/v1/requests/{requestId}Retrieve a request by ID.
DELETE/api/v1/requests/{requestId}Delete a request.
PUT/api/v1/requests/{requestId}/feedbackAttach feedback to a request.
POST/api/v1/requests/{requestId}/retryRetry a failed request.

POST /api/v1/requests query parameters:

ParameterTypeDescription
conversationIdstringAttach request to an existing conversation
providerstringOverride LLM provider for this request
modelstringOverride LLM model for this request
disableReasoningbooleanDisable tool calls for this request

Request body schema (Request):

{
"conversation": "optional-conversation-id",
"inputs": [
{
"role": "user",
"content": [
{ "type": "text", "value": "Hello" },
{ "type": "prompt", "value": "promptId", "payload": { "key": "value" } },
{ "type": "goal", "value": "goalGroupId", "payload": { "key": "value" } },
{ "type": "image", "value": "<base64>" }
]
}
]
}

Conversations — /api/v1/conversations

MethodPathDescription
POST/api/v1/conversationsCreate a new conversation.
GET/api/v1/conversationsList conversations for the current user (paginated). Optional search query param filters by title.
GET/api/v1/conversations/{id}Get a conversation by ID.
DELETE/api/v1/conversations/{id}Delete a conversation.

Prompts (user) — /api/v1/prompts

MethodPathDescription
GET/api/v1/promptsList prompts available to the current user.
GET/api/v1/prompts/{id}Get a prompt by ID.
GET/api/v1/prompts/displayList the display settings of prompts enabled for Quick Prompt (never exposes template content or LLM configuration).

Files — /api/v1/files

MethodPathDescription
POST/api/v1/filesUpload a file.
GET/api/v1/files/{id}Download a file by ID.

Scripts — /api/v1/scripts

MethodPathDescription
GET/api/v1/scripts/{id}Serve a deployed script as application/javascript (401 if never deployed). Supports ETag / 304.
GET/api/v1/scripts/{id}/draftServe a script's draft content as application/javascript (for preview).

Web component config — /api/v1/webcomponent

MethodPathDescription
GET/api/v1/webcomponentReturns configuration for the web component (prompts available, endpoints).

Admin endpoints

All admin endpoints require the requesting user to have the necessary role if role-based security is configured on the gateway.

LLM providers — /api/v1/admin/llm

MethodPathDescription
GET/api/v1/admin/llm/providersList all available provider type names.
GET/api/v1/admin/llm/providers/{name}/extra-paramsGet extra parameter descriptors for a provider type.
GET/api/v1/admin/llm/provider-confList all LLM provider configurations for the current tenant.
POST/api/v1/admin/llm/provider-confCreate a new LLM provider configuration.
PUT/api/v1/admin/llm/provider-conf/{id}Update a provider configuration.
DELETE/api/v1/admin/llm/provider-conf/{id}Delete a provider configuration.

Prompts — /api/v1/admin/prompts

MethodPathDescription
GET/api/v1/admin/promptsList all prompts for the current tenant.
POST/api/v1/admin/promptsCreate a new prompt. Returns 409 if a prompt with the same ID exists.
PUT/api/v1/admin/promptsUpdate an existing prompt.
GET/api/v1/admin/prompts/{id}Get a prompt by ID.
GET/api/v1/admin/prompts/{id}/renderRender a prompt with a payload (body: Map<String, Object>).
GET/api/v1/admin/prompts/{id}/usagesGet usage statistics for a prompt.
GET/api/v1/admin/prompts/categoriesList distinct Quick Prompt categories currently in use.
DELETE/api/v1/admin/prompts/{id}Delete a prompt.

Scripts — /api/v1/admin/scripts

MethodPathDescription
GET/api/v1/admin/scriptsList all scripts for the current tenant.
GET/api/v1/admin/scripts/{id}Get a script by ID.
POST/api/v1/admin/scriptsCreate a script (name only). Returns 409 if the name exists.
PUT/api/v1/admin/scripts/{id}Update the draft content.
POST/api/v1/admin/scripts/{id}/scanRun the LLM security scan.
POST/api/v1/admin/scripts/{id}/publishPublish a certified draft.
POST/api/v1/admin/scripts/{id}/force-publishPublish the draft without scanning.
DELETE/api/v1/admin/scripts/{id}/draftDiscard the draft.
DELETE/api/v1/admin/scripts/{id}Delete the script (204 No Content).

MCP servers — /api/v1/admin/mcp

MethodPathDescription
GET/api/v1/admin/mcp/mcp-confList MCP server configurations for the current tenant.
GET/api/v1/admin/mcp/mcp-conf/{id}Get an MCP server configuration.
POST/api/v1/admin/mcp/mcp-confRegister an MCP server.
PUT/api/v1/admin/mcp/mcp-conf/{id}Update an MCP server configuration.
GET/api/v1/admin/mcp/mcp-conf/{id}/toolsList the tools exposed by an MCP server (connection test).

Goals — /api/v1/admin/goals

MethodPathDescription
GET/api/v1/admin/goalsList all goal groups for the current tenant.
POST/api/v1/admin/goalsCreate a new goal group.
PUT/api/v1/admin/goals/{id}Update a goal group.
GET/api/v1/admin/goals/{id}Get a goal group by ID.
DELETE/api/v1/admin/goals/{id}Delete a goal group.

Users — /api/v1/admin/users

MethodPathDescription
GET/api/v1/admin/users/statisticsList users with conversation, token, and request statistics.
GET/api/v1/admin/users/details?userId={id}Get details (stats + conversations) for a specific user.

Conversations (admin) — /api/v1/admin/conversations

MethodPathDescription
GET/api/v1/admin/conversationsList all conversations for the current tenant (paginated).

Requests (admin) — /api/v1/admin/requests

MethodPathDescription
GET/api/v1/admin/requestsList all requests for the current tenant (paginated).

Statistics — /api/v1/admin/stats

MethodPathDescription
GET/api/v1/admin/stats/globalGlobal aggregated statistics (totals).
GET/api/v1/admin/stats/timeseriesActivity time series. Query param: interval (DAY, HOUR, WEEK, MONTH).
GET/api/v1/admin/stats/llm-distributionLLM model usage distribution.
GET/api/v1/admin/stats/feature-adoptionFeature adoption statistics.
GET/api/v1/admin/stats/top-prompts-time-savedTop prompts by cumulative time saved.

Templating — /api/v1/admin/templating

MethodPathDescription
GET/api/v1/admin/templatingTemplating operations (details via Swagger UI).

Health and info

MethodPathAuthDescription
GET/actuator/healthPublicApplication health check
GET/actuator/infoConfiguredBuild info
GET/actuator/loggersConfiguredLogger level management

WebSocket

PathProtocolDescription
/ws/{userId}WebSocketReal-time streaming channel per user

API explorer

The Swagger UI is available at:

http://localhost:8085/swagger-ui/index.html

The OpenAPI spec is at /v3/api-docs. Both paths are served as public in the default gateway configuration.