Skip to main content
Version: Next

REST API

Two nodes in one. In ingress mode it publishes an endpoint that starts the pipeline when called; in egress mode it makes an outbound HTTP request.

Type: rest-api · Category: API · Ports: one input · one output

The REST API node as it appears on the pipeline canvas.The REST API node as it appears on the pipeline canvas.

When to use it

  • Accepting orders, recipes or schedules pushed by an ERP or MES
  • Calling a webhook, a chat service or a third-party API
  • Exposing a value to something that cannot read tags

Settings

SettingKeyDefaultPurpose
ModemodeingressReceive requests, or make them.
MethodmethodGETHTTP method; * for any (ingress).
URL patternurlPattern/api/v1/exampleRoute pattern, e.g. /api/v1/orders/:id.
Timeouttimeout30 sRequest timeout.
Auth typeauthTypenone in the node default; routes default to api_keySee below.
Allowed IPsallowedIPsComma-separated CIDR allow-list.
Rate limit / burstrateLimit, burstLimit0 (off)Requests per second, and burst size.
Max payload sizemaxPayloadSize1 MBRequest body cap.
CORScorsEnabled, allowedOriginsfalse, *Browser access control.
Header whitelistingressWhitelistHeadersWhich request headers are passed through.
Static headersegressStaticHeaders{}Headers added to outbound calls.

Example A — ingress, accepting an order from an ERP

Mode: ingress
Method: POST
URL pattern: /api/v1/orders
Auth type: api_key
Rate limit: 10

Out

{
"payload": { "orderId": "SO-4471", "line": "LINE1", "quantity": 1200 },
"req": { "method": "POST", "path": "/api/v1/orders", "headers": {}, "query": {} }
}

Example B — egress, posting to a webhook

Mode: egress
Method: POST
URL pattern: https://hooks.example.com/plant-alerts
Timeout: 10
Ingress routes are fail-closed

A published route without an explicit auth type requires an API key. A route is public only when its author deliberately sets auth to none.

Gotchas

  • Set an egress timeout shorter than the caller's patience. A 30-second outbound call inside a pipeline triggered every 10 seconds builds a backlog you will not notice until it is deep.
  • Every ingress path must reach an HTTP Response, or the caller waits for its own timeout.

See also