一键导入
iii-http-endpoints
Exposes iii functions as REST API endpoints. Use when building HTTP APIs, webhooks, or inbound request handling where iii owns the route.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Exposes iii functions as REST API endpoints. Use when building HTTP APIs, webhooks, or inbound request handling where iii owns the route.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | iii-http-endpoints |
| description | Exposes iii functions as REST API endpoints. Use when building HTTP APIs, webhooks, or inbound request handling where iii owns the route. |
Comparable to: Express, Fastify, Flask
Use the concepts below when they fit the task. Not every HTTP endpoint needs all of them.
body, path_params, headers, and method{ status_code, body, headers } to shape the HTTP responseiii worker add iii-http/users/:id) and arrive in path_paramsmiddleware_function_ids in the trigger config — see iii-http-middleware for detailsHTTP request
→ iii-http (port 3111)
→ registerTrigger route match (method + path)
→ registerFunction handler (receives ApiRequest)
→ { status_code, body, headers } response
| Primitive | Purpose |
|---|---|
registerFunction | Define the handler for a route |
registerTrigger({ type: 'http' }) | Bind a route path and method to a function |
config: { api_path: '/path', http_method: 'GET' } | Route configuration on the trigger |
config: { ..., middleware_function_ids: [...] } | Optional middleware chain before the handler |
See ../references/http-endpoints.js for the full working example — a REST API with parameterized routes handling GET and POST requests.
Also available in Python: ../references/http-endpoints.py
Also available in Rust: ../references/http-endpoints.rs
Code using this pattern commonly includes, when relevant:
registerWorker(url, { workerName }) — worker initializationregisterFunction(id, handler) — define the route handlerregisterTrigger({ type: 'http', config: { api_path, http_method } }) — bind path and methodreq.body — parsed request body for POST/PUTreq.path_params — extracted path parametersreturn { status_code: 200, body: { data }, headers: { 'Content-Type': 'application/json' } } — response shapeconst logger = new Logger() — structured logging per handlerUse the adaptations below when they apply to the task.
iii worker add iii-http, then start/sync workers via iii-worker-lifecycle.path_params for resource identifiers (e.g. /orders/:orderId)middleware_function_ids) or inspect req.headers for tokens or API keysiii-http-middlewareiii-http-invoked-functions.iii-queue-processing for the background work.iii-http-middleware.iii-http-endpoints when iii owns the route and handles the inbound request directly.iii-http-endpoints in the iii engine.KTG content marketing pipeline. Takes a written blog post and runs the full publishing workflow: repurpose for all platforms, generate hero image, SEO and AI citation optimisation, then pause for green-light before publishing to all channels via Composio. Local-first: uses Ollama for text tasks where quality allows, cloud for image gen and live data. Use when user says "hub", "/hub", "publish this", "run the pipeline", "post this everywhere".
KTG content marketing pipeline — SWARM MODE. Orchestrates 7 plugins via parallel agent dispatch. Drop a post, get it published everywhere with maximum parallelism. Local-first: Ollama for text, cloud for images and live data. Agents run simultaneously, not sequentially.
KTG content marketing pipeline — SWARM MODE v2. Concrete 11-agent parallel pipeline using the Agent tool. Local-first: Ollama for text, cloud for images and publish. Drop a post, spawn agents, publish everywhere.
Browser SDK for connecting to the iii engine from web applications via WebSocket. Use when building browser-based clients that register functions, invoke triggers, or consume streams from the frontend.
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
Registers cron triggers with 7-field expressions to run functions on recurring schedules. Use when scheduling periodic jobs, timed automation, crontab replacements, cleanup routines, report generation, batch processing, or calendar-based work that is genuinely time-driven.