skip to content
$registry / workers

http

v0.22.6

Expose functions as HTTP endpoints — registers the `http` trigger type and serves matched routes.

worker
iiiverified
5,750 installs1,217 in 7d145 today
install
$iii trigger compose::add worker=http@next
binarylicense: Apache-2.0apiendpointhttprest
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

4

http::configuration-id

function

Returns this HTTP instance's configuration entry ID, without its value.

request
empty object
response
  • idstringrequired

http::on-config-change

function

Internal: reload http configuration from the authoritative store on change.

request
empty object
response
  • okbooleanrequired

http::status

function

Where the public HTTP server listens: its host, its port and the base URL to open from this machine (for example http://127.0.0.1:3111). Read-only; use it instead of assuming port 3111.

request
empty object
response
  • hoststring

    The bound interface (`0.0.0.0` serves every network interface). None while the server is stopped.

  • last_reload_errorstring

    Last configuration reload failure, e.g. the port is already in use; cleared by the next successful reload.

  • portinteger· uint16min 0

    The bound port (the OS-assigned one for port 0). None while stopped.

  • urlstring

    The base URL to open from this machine, e.g. `http://127.0.0.1:3111`: loopback when the server listens on every interface.

http::webhook-listener::status

function

Internal: the restricted webhook listener this process has actually bound and the last reload error.

request
empty object
response
  • appliedany of

    The listener this process has bound: the last successfully applied configuration (a failed bind keeps the previous one). None when the listener is off or the server is stopped.

    any of (2)
    variant 1
    • hoststring

      Loopback by default; expose only this listener through a reverse proxy.

    • portinteger· uint16min 0

      Restricted port, separate from the normal listener (3111).

    variant 2
    valuenull
  • last_reload_errorstring

    Last configuration reload failure, e.g. the port is already in use; cleared by the next successful reload.

triggers

1

http

trigger

HTTP API trigger

invocation
  • api_pathstringrequired
  • condition_function_idstring
  • http_methodstring
  • middleware_function_idsstring[]
  • public_webhookboolean

    Also expose this route on the restricted webhook listener. Explicit opt-in only; the default keeps existing routes on the normal listener.

return
  • bodyunknownrequired
  • headersobjectrequired
  • methodstringrequired
  • pathstringrequired
  • path_paramsobjectrequired
  • query_paramsobjectrequired
  • request_bodyobjectrequired
    • access_keystringrequired
    • channel_idstringrequired
    • directionstringrequiredenum: read, write
  • responseobjectrequired
    • access_keystringrequired
    • channel_idstringrequired
    • directionstringrequiredenum: read, write
  • triggerany of
    any of (2)
    variant 1
    • methodstring
    • pathstring
    • typestringrequired
    variant 2
    valuenull