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 (201). Returns the request with the LLM response.
POST/api/v1/requests/streamSend a request and stream the response as SSE (used by the chat and Quick Prompt).
POST/api/v1/requests/retryRegenerate the last response of the conversation named in the body (201).
POST/api/v1/requests/retry/streamSame, streamed as SSE.
GET/api/v1/requestsList the requests of a conversation (paginated). Query param: conversation.
GET/api/v1/requests/{request_id}Retrieve a request by ID.
DELETE/api/v1/requests/{request_id}Delete a request.
PUT/api/v1/requests/{request_id}/feedback/{feedback}Attach feedback to a request — the value is a path segment, GOOD or BAD.

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": "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/{conversation_id}Get a conversation by ID.
DELETE/api/v1/conversations/{conversation_id}Delete a conversation.
POST/api/v1/conversations/{conversation_id}/stopStop the generation in progress on that conversation.

Prompts (user) — /api/v1/prompts

MethodPathDescription
GET/api/v1/promptsList prompts available to the current user.
GET/api/v1/prompts/displayList the display settings of prompts enabled for Quick Prompt (never exposes template content or LLM configuration).

Users (user) — /api/v1/users

MethodPathDescription
GET/api/v1/users/detailsDetails of the currently authenticated user.

Files — /temp-files

MethodPathDescription
GET/temp-files/{fileKey}Download a temporary file by its key (files produced by a tool or an agent run).

There is no upload endpoint: files and images enter a conversation as base64 content items on a request ({ "type": "image", "value": "<base64>" }), not through a separate POST.

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 assets — /api/web-components

Not under /api/v1 — these serve the built web-component bundles themselves. See Web components.

MethodPathDescription
GET/api/web-components/chat/scriptChat web component bundle (JavaScript).
GET/api/web-components/chat/styleChat web component stylesheet.
GET/api/web-components/quick-prompt/scriptQuick Prompt bundle.
GET/api/web-components/quick-prompt/styleQuick Prompt stylesheet.
GET/api/web-components/admin/scriptAdmin panel bundle.
GET/api/web-components/admin/styleAdmin panel stylesheet.
GET/api/web-components/**Any other static asset referenced by those bundles (fonts, chunks).

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.
GET/api/v1/admin/llm/provider-conf/{id}Get one provider configuration, with its API key masked.
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

Since 2026.0.0-ft5, a prompt is one document holding a version history with an explicit draft → publish lifecycle — see Managing prompts for what that lifecycle means in the admin UI.

The prompt itself:

MethodPathDescription
GET/api/v1/admin/promptsList all prompts for the current tenant.
POST/api/v1/admin/promptsCreate a new prompt with its initial version, v0 (201). 409 if a prompt with the same ID exists.
GET/api/v1/admin/prompts/{id}Get the prompt aggregate — {id, versions: [...]} — by ID.
GET/api/v1/admin/prompts/{id}/renderRender the active version, or the one given by ?version=. Takes an optional JSON payload in the request body (Map<String, Object>).
GET/api/v1/admin/prompts/{id}/statisticsGet usage statistics for a prompt, aggregated across all versions.
GET/api/v1/admin/prompts/{id}/usageWhether the prompt is deletable, and which Applications reference it.
GET/api/v1/admin/prompts/categoriesList distinct Quick Prompt categories currently in use.
DELETE/api/v1/admin/prompts/{id}Delete a prompt and all of its versions (204). 409 if it's a base prompt or referenced by an Application.

Versions — the draft → publish lifecycle:

A prompt has at most one draft at a time, and the draft is the only writable version: every published version is read-only, and any write targeting one is rejected with 409 Conflict.

MethodPathDescription
GET/api/v1/admin/prompts/{id}/versionsList every version of the prompt, ordered by version number.
GET/api/v1/admin/prompts/{id}/versions/{version}Get one specific version.
POST/api/v1/admin/prompts/{id}/versionsCreate the draft — the next version (201). 409 if a draft already exists.
PUT/api/v1/admin/prompts/{id}/versions/{version}Edit the draft (draft:true in the body) or publish it (draft:false). 409 if the target isn't the draft.
DELETE/api/v1/admin/prompts/{id}/versions/{version}Discard the draft (204), keeping published versions intact. 409 if the target isn't the draft.
GET/api/v1/admin/prompts/{id}/versions/{version}/statisticsUsage statistics for a single version.

Publishing archives the previously-published version rather than deleting it, so restoring an older wording means re-publishing its content as a new version — there is no endpoint that reactivates an old version number in place. A draft can also be exercised by real callers before it goes live, by setting version on a type: prompt content item in a normal request (see Conversations and requests).

Applications — /api/v1/admin/application

Since 2026.0.0-ft5. Note the singular application base path and the application-conf resource segment. See Managing Applications.

MethodPathDescription
GET/api/v1/admin/application/application-confList all Application configurations for the current tenant.
GET/api/v1/admin/application/application-conf/{id}Get one Application configuration.
POST/api/v1/admin/application/application-confCreate an Application (201). 400 if the configuration is invalid or the name already exists.
PUT/api/v1/admin/application/application-conf/{id}Update an Application configuration.
DELETE/api/v1/admin/application/application-conf/{id}Delete an Application configuration (204).

Agent configurations — /api/v1/admin/agent

The reusable agent configurations referenced by AGENT nodes in a Plan — see Managing Plans.

MethodPathDescription
GET/api/v1/admin/agent/agent-confList all agent configurations for the current tenant.
GET/api/v1/admin/agent/agent-conf/{id}Get one agent configuration.
POST/api/v1/admin/agent/agent-confCreate an agent configuration (201). 400 if invalid or the title already exists.
PUT/api/v1/admin/agent/agent-conf/{id}Update an agent configuration.
DELETE/api/v1/admin/agent/agent-conf/{id}Delete an agent configuration (204).

Plans — /api/v1/admin/plans

Since 2026.0.0-ft5. See Agentic Plans.

MethodPathDescription
GET/api/v1/admin/plansList all Plan definitions for the current tenant.
GET/api/v1/admin/plans/{id}Get one Plan definition.
POST/api/v1/admin/plansCreate a Plan (201). 400 if invalid or the title already exists.
PUT/api/v1/admin/plans/{id}Update a Plan.
DELETE/api/v1/admin/plans/{id}Delete a Plan (204).

Plan executions — /api/v1/admin/plan-executions

MethodPathDescription
GET/api/v1/admin/plan-executionsList main (non-nested) executions; nested runs are reachable through their parent.
GET/api/v1/admin/plan-executions/{id}Get one execution, including every node's state. Poll this for progress.
POST/api/v1/admin/plan-executions/runCreate and immediately start an execution — body { "planId": "...", "inputPayload": { ... } } (202).
POST/api/v1/admin/plan-executions/{id}/pauseRequest a cooperative pause; in-flight nodes finish first. 409 if not RUNNING.
POST/api/v1/admin/plan-executions/{id}/resumeResume from persisted state without re-running terminal nodes. 409 if not PAUSED.
POST/api/v1/admin/plan-executions/{id}/stopStop permanently (CANCELLED), keeping the partial trace. 409 if already terminal.
DELETE/api/v1/admin/plan-executions/{id}Delete an execution record (204).

Tools — /api/v1/admin/tools

MethodPathDescription
GET/api/v1/admin/toolsList every registered native tool with its name and description — what feeds the tool pickers in the admin UI.

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.
DELETE/api/v1/admin/mcp/mcp-conf/{id}Delete an MCP server configuration (204).
GET/api/v1/admin/mcp/mcp-conf/{id}/toolsList the tools exposed by an MCP server (connection test).

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).
GET/api/v1/admin/conversations/{conversation_id}Get any conversation by ID, regardless of owner.
DELETE/api/v1/admin/conversations/{conversation_id}Delete any conversation by ID.

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

MethodPathDescription
GET/api/v1/admin/requestsList requests for the current tenant (paginated). Query param: conversation.
GET/api/v1/admin/requests/{request_id}Get any request by ID.
DELETE/api/v1/admin/requests/{request_id}Delete any request by ID.

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/templating/completionAuto-completion metadata for the template editor: available service helpers and context variables.

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.