API Reference
Über unsere Backend-API können Drittsysteme die Administration der Bots übernehmen. Zum interaktiven Ausprobieren (inkl. "Try it out") steht die echte Swagger-UI zur Verfügung: https://ki-toolbox.reflactportal.com/swagger.
Um diese API nutzen zu können, wird ein Token benötigt. Dieser kann im jeweiligen Bot unter Zugriff erstellt werden.
Version: 2.3.0
Public External API
Bot: requires X-BOTAPI-KEY header
Project: requires X-PROJECTAPI-KEY header
Alternatively (bot and project API): a user's Logto organization token as Authorization: Bearer <token> together with X-ENGINE-BOT-ID (always required) and X-ENGINE-PROJECT-ID (required for bots in a project, must be omitted for bots without project); never combined with an API key. Scopes follow the user's project permission: write access grants all scopes, read access only the :read scopes (bot API also blockly:validate). Bots without project: only the bot's creator has access (all scopes), independent of the token tenant; sending X-ENGINE-PROJECT-ID for such a bot or omitting it for a bot in a project answers 403, an invalid header value 400. Via the project API only the X-ENGINE-BOT-ID bot can be used; creating, duplicating and deleting bots is not allowed (project API and bot API, errorType BOT_LIFECYCLE_FORBIDDEN); the project API requires a project (bots without project answer 403 with errorType PROJECT_API_WITHOUT_PROJECT). Rejections in Logto mode and missing scopes (both modes, MISSING_SCOPE) carry a stable errorType next to message (see ExternalErrorMessage); match on errorType, not on the message text.
Bot selection for Logto users: GET /api/external/logto/bots and /api/external/logto/bots/{botId} take only the bearer token (no X-ENGINE- headers, no API keys) and also return the user's own bots without project (projectId, projectName and orgShort null). GET /api/external/logto/projects (same authentication) lists the projects of the token tenant and the user's own private projects, including empty ones, with canWrite (optionally filtered with ?scope=mandant|private). POST /api/external/logto/projects creates a project in the token tenant or a private project (bearer token only). GET /api/external/logto/bot-templates (same authentication) returns the released template catalog. POST /api/external/logto/bots/from-template copies a released template into a project the user may write to. POST /api/external/logto/bots creates a blank bot and POST /api/external/logto/bots/{botId}/copy copies an own bot the user may edit, both into a project the user may write to. GET /api/external/logto/bots/{botId}/export downloads a bot the user can read as ZIP (same content as the admin export). GET/PUT/DELETE /api/external/logto/bots/{botId}/presence report who is working on the bot right now (Engine admins and external apps such as puzzleflow).