TITLE=WarpEngine Admin API ROUTE=/engines/warp-engine/admin-api LOCALE=en MODIFIED=1792409344 URL=https://wiki.teletypegames.org/engines/warp-engine/admin-api L=1 #22 L=2 #54 q│ Since 1WarpEngine 1.0 everything the ActiveAdmin resources do is also a JSON q│ API under c/api/admin/v1q: the catalog with its releases, assets, links and q│ images, the status and category vocabulary, platform links, download q│ statistics, pipelines, the artifact store and the application tokens. It is q│ off until the host turns it on, it describes itself in an OpenAPI 3.1 q│ document, and it can serve the same operations to LLM agents as an MCP q│ server. The read side for catalog readers stays 2WECP. 1Turning it on 1═════════════ p # config/initializers/warp_engine.rb p WarpEngine.configure do |c| p c.admin_api.enabled = true p c.admin_api.mcp = true # needs gem "mcp" » p in the Gemfile p c.admin_api.rate_limit = { to: 300, within: 1.minute } # per token p end t┌────────────────────────┬─────────────────────────┬─────────────────────────┐ t│h Key t│h Default t│h Meaning t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cenabled0 t│0 cfalse0 t│0 Off: every Admin API t│ t│0 t│0 t│0 address answers 404 t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 ctoken_owner_class0 t│0 capplication_token_0 t│0 The model whose tokens t│ t│0 t│0 cowner_class0 t│0 may hold admin scopes t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cauthenticator0 t│0 c:application_token0 t│0 Or a callable that t│ t│0 t│0 t│0 turns a request into a t│ t│0 t│0 t│0 cWarpEngine::AdminApi::P0 t│ t│0 t│0 t│0 crincipal0 t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cresources0 t│0 c:all0 t│0 Or a list, for example t│ t│0 t│0 t│0 c%i[softwares releases0 t│ t│0 t│0 t│0 cdownloads]0; the rest t│ t│0 t│0 t│0 answers 404 t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cread_only0 t│0 cfalse0 t│0 ctrue0: every write t│ t│0 t│0 t│0 answers 405 and leaves t│ t│0 t│0 t│0 the document t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cpage_size0 / t│0 c500 / c2000 t│0 Paging of the lists t│ t│0 cmax_page_size0 t│0 t│0 t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 crate_limit0 t│0 cnil0 t│0 c{ to:, within: }0 per t│ t│0 t│0 t│0 token, counted in t│ t│0 t│0 t│0 cRails.cache0; 429 with t│ t│0 t│0 t│0 cRetry-After0 past it t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 copenapi_requires_auth0 t│0 ctrue0 t│0 cfalse0: the OpenAPI t│ t│0 t│0 t│0 document is public t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cdocs_ui0 t│0 cfalse0 t│0 ctrue0: a Redoc page at t│ t│0 t│0 t│0 c/api/admin/v1/docs0 t│ t│0 t│0 t│0 (follows the document's t│ t│0 t│0 t│0 auth rule) t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cmcp0 t│0 cfalse0 t│0 ctrue0: MCP at t│ t│0 t│0 t│0 c/api/admin/v1/mcp0 t│ t├────────────────────────┼─────────────────────────┼─────────────────────────┤ t│0 cmcp_exclude0 t│0 capplication_tokens0, t│0 Resources MCP leaves t│ t│0 t│0 cdevice_grants0 t│0 out t│ t└────────────────────────┴─────────────────────────┴─────────────────────────┘ On teletypegames.org the Admin API and MCP are on since 1.0.0, with AdminUser tokens. 1Tokens and scopes 1═════════════════ p Authorization: Bearer 3f9c… An 1application token issued in the admin (App Tokens → Admin API scope) or through the API itself. Three scopes, none implying another: t┌──────────────┬─────────────────────────────────────────────────────────────┐ t│h Scope t│h Opens t│ t├──────────────┼─────────────────────────────────────────────────────────────┤ t│0 cadmin:read0 t│0 every GET t│ t├──────────────┼─────────────────────────────────────────────────────────────┤ t│0 cadmin:write0 t│0 every create, change, delete, trigger, sync and file t│ t│0 t│0 operation t│ t├──────────────┼─────────────────────────────────────────────────────────────┤ t│0 cadmin:tokens0 t│0 the application token and device sign-in resources, reading t│ t│0 t│0 included t│ t└──────────────┴─────────────────────────────────────────────────────────────┘ Only a token whose owner is the admin owner class may hold them — a publisher's token never becomes an admin token. A token can grant no admin scope it lacks, no cunrestricted0, and no expiry past its own; it cannot rotate a token wider than itself either, since rotation hands over the new secret. It may issue publishing tokens (cupdate0, cupload0) and client tokens (ccatalog0). 1Shape 1═════ • JSON, camelCase keys in bodies, answers and query parameters (cperPage0, cneedsReview0). • A list: c{ "data": [ … ], "meta": { "page", "perPage", "total", "totalPages", c"nextPage" } }0; cpage0 and cperPage0 choose, csort=title0 or csort=-createdAt orders. • One record: c{ "data": { … } }0. A delete answers 204. • An error: c{ "error": "Validation failed", "details": { "name": ["has already cbeen taken"] } }0. • Status codes: 400 malformed parameter, 401 no or non-admin token, 403 missing scope, 404 no such record or resource not enabled, 405 read-only, 409 conflict, 422 validation, 429 rate limit, 502 the CI server failed, 503 CI not configured. • A delete does what the admin does: the record is destroyed, a token is revoked. The last write wins, as in the admin; there are no batch operations. • Every answer carries cWarpEngine-Version0 and cWarpEngine-Admin-Api: 10. • Every successful write instruments cwarp_engine.admin_api.write0 with the principal, the operation and cvia0 (chttp0 or cmcp0), for a host's audit log. 1Operations 1══════════ t┌──────────────────────┬─────────────────────────────────────────────────────┐ t│h Resource t│h Operations t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Softwares t│0 cGET/POST /softwares0, cGET/PATCH/DELETE0 t│ t│0 t│0 c/softwares/{id}0 t│ t│0 t│0 (cinclude=releases,images,externalLinks,extras0) t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Releases t│0 cGET/POST /softwares/{softwareId}/releases0, t│ t│0 t│0 cGET/PATCH/DELETE /releases/{id}0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Release assets t│0 cGET/POST /releases/{releaseId}/assets0, t│ t│0 t│0 cGET/PATCH/DELETE /assets/{id}0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 External links t│0 cGET/POST /softwares/{softwareId}/external_links0, t│ t│0 t│0 cGET/PATCH/DELETE /external_links/{id}0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Software images t│0 cGET/POST /softwares/{softwareId}/images0, cPOST0 t│ t│0 t│0 c…/images/upload0 (multipart), cGET/PATCH/DELETE0 t│ t│0 t│0 c/software_images/{id}0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Additional resources t│0 cGET/PATCH0 t│ t│0 t│0 c/softwares/{softwareId}/extras/{association}0 — a t│ t│0 t│0 host's own records, see below t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Vocabulary t│0 c/software_statuses0, c/software_categories0, t│ t│0 t│0 c/platform_links0, each with cGET/POST0 and t│ t│0 t│0 cGET/PATCH/DELETE /{id}0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Downloads t│0 cGET /downloads0, cGET /downloads/{id}0, t│ t│0 t│0 c/downloads/summary0, c/downloads/top_files0, t│ t│0 t│0 c/downloads/top_softwares0, t│ t│0 t│0 c/softwares/{id}/download_stats0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Pipelines t│0 cGET /pipelines0, cGET/PATCH /pipelines/{id}0, cGET0 t│ t│0 t│0 c/pipelines/{id}/runs0, cPOST /pipelines/{id}/trigger0, t│ t│0 t│0 cPOST /pipelines/sync0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Files t│0 cGET /files?dir=0, cPOST /files0 (multipart), cPOST0 t│ t│0 t│0 c/files/directories0, cPATCH /files0, cDELETE0 t│ t│0 t│0 c/files?path=0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Tokens t│0 cGET/POST /application_tokens0, cGET/PATCH/DELETE0 t│ t│0 t│0 c/application_tokens/{id}0, cPOST0 t│ t│0 t│0 c/application_tokens/{id}/rotate0, cGET0 t│ t│0 t│0 c/device_grants[/{id}]0 t│ t├──────────────────────┼─────────────────────────────────────────────────────┤ t│0 Meta t│0 cGET /me0 — the caller, its scopes and the resources t│ t│0 t│0 it may use t│ t└──────────────────────┴─────────────────────────────────────────────────────┘ Creating a token is the one answer that carries its cplainToken0; it is never shown again. A host's cadditional_resources0 appear under cextras0 once the host gives them an capi_schema0 — on teletypegames.org that is the SEO metadata of a software. 1OpenAPI 1═══════ cGET /api/admin/v1/openapi.json0 (or copenapi.yaml0) is generated from the same registry that routes the requests, at request time, so it describes exactly what this host serves: resources left out, writes under cread_only0, and pipelines or device sign-ins where the host has no CI or no client sign-in are not in it. Each operation carries cx-required-scope0, and its coperationId0 is also its MCP tool name. It needs an cadmin:read0 token unless the host made it public. 1MCP 1═══ With cc.admin_api.mcp = true0, cPOST /api/admin/v1/mcp0 is a stateless Streamable HTTP MCP server — no session, no stream, one JSON answer per request — built on the official Ruby SDK. The same bearer token and scopes apply. • Every operation is a tool: csoftware_list0, csoftware_update0, crelease_create0, cpipeline_trigger0, cdownload_summary0, cadmin_whoami0 …, with the same JSON Schema as input and the same answer as structured content. A failed operation is a tool error carrying the HTTP status. • ctools/list0 shows only what the token may call, after cresources0, cread_only and the CI and sign-in conditions. • Uploads stay out, and so do the token resources by default: a fresh plain token has no business in a model's context, its transcript and its logs. p claude mcp add --transport http warp-admin https://teletypegames.org/api/adm» p in/v1/mcp \ p --header "Authorization: Bearer 3f9c…" 1Discovery 1═════════ cGET /api/service0 (2WECP) carries an cadmin0 key: null while the Admin API is off, otherwise its version, curl0, copenapiUrl0 and cmcpUrl0. The addresses are public; what lives there is not.