Exposes iii functions as REST API endpoints. Use when building HTTP APIs, webhooks, or inbound request handling where iii owns the route.
70
62%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/iii-http-endpoints/SKILL.mdComparable 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 response/users/:id) and arrive in path_paramsmiddleware_function_ids in the trigger config — see iii-http-middleware for detailsHTTP request
→ RestApiModule (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.
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.8921efa
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.