Skip to main content

Description of the JSON Schema

This document describes the structure of the JSON schema for the Integrations module.

General Structure

The JSON schema is an array of objects, where each object is either a node or a tab:

[
{
"label": "Hello World!",
"id": "1f24387b252057fe",
"type": "tab",
"disabled": false
},
{
"name": "run",
"id": "b51ab819b83e1915",
"type": "inject",
"x": 46.96875,
"y": 99.51171875,
"z": "1f24387b252057fe",
"wires": [
[
"bd07e1ff0aedba0b"
]
]
},
{
"id": "2b524ca59e4ed633",
"type": "debug",
"name": "debug",
"x": 610.05078125,
"y": 98.59765625,
"z": "1f24387b252057fe",
"wires": []
},
{
"name": "function",
"func": "msg.payload = 'World'\n\nreturn msg;",
"id": "bd07e1ff0aedba0b",
"type": "function",
"x": 229.62890625,
"y": 98.8515625,
"z": "1f24387b252057fe",
"wires": [
[
"2e1172b330c69aeb"
]
]
},
{
"id": "2e1172b330c69aeb",
"type": "template",
"name": "template",
"x": 418.66796875,
"y": 98.19140625,
"z": "1f24387b252057fe",
"syntax": "mustache",
"template": "Hello {{payload}} !",
"output": "str",
"wires": [
[
"2b524ca59e4ed633"
]
]
}
]

Main Node Parameters

Most nodes have the following common parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (e.g., "inject", "function", "template")
  • name (string) - displayed name of the node
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of arrays of node identifiers to which the output is connected

System Nodes

"tab" Node

The tab node serves as a container for a group of nodes, visually represented as a tab in the interface.

Parameters:

  • label (string) - displayed name of the tab
  • id (string) - unique identifier of the tab
  • type (string) - type of the node (tab)
  • disabled (boolean) - whether the tab is disabled

"debug" Node

The debug node is used to output messages to the debug panel.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (debug)
  • name (string) - displayed name of the node
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

Connections Between Nodes

The wires parameter defines the connections between nodes. Each element of the array corresponds to the output of a node and contains an array of identifiers of nodes to which this output is connected.

Example:

"wires": [
[
"bd07e1ff0aedba0b"
]
]

Description of Node Parameters

"inject" Node

The inject node is used to create and send messages into the flow manually.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (inject)
  • name (string) - displayed name of the node
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"function" Node

The function node allows executing arbitrary JavaScript code.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (function)
  • name (string) - name of the node
  • func (string) - code to be executed
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"template" Node

The template node is used to transform messages using templates.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (template)
  • name (string) - name of the node
  • syntax (string) - template syntax (mustache or plain)
  • template (string) - message template
  • output (string) - output type (plain, json, or yaml)
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"interval-node"

The interval-node is used to generate messages at specified time intervals.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (interval-node)
  • name (string) - name of the node
  • interval (number) - interval in minutes between messages
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"switch" Node

The switch node is used to route messages along different paths based on conditions.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (switch)
  • name (string) - name of the node
  • property (string) - message property to check
  • rules (array) - array of rules for routing
  • outputs (number) - number of output ports
  • checkall (string) - check all rules (true or false)
  • repair (boolean) - repair invalid messages
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"split" Node

The split node is used to divide messages into multiple parts.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (split)
  • name (string) - name of the node
  • property (string) - message property to split
  • propertyType (string) - type of property (msg, flow, global)
  • splt (string) - delimiter for strings
  • spltType (string) - type of delimiter (str, bin)
  • arraySplt (number) - size of parts for arrays
  • arraySpltType (string) - type of array splitting (len, index)
  • stream (boolean) - streaming mode processing
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for outputs

"http in" Node

The http in node is used to create HTTP endpoints and receive incoming HTTP requests.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (http in)
  • name (string) - name of the node (optional)
  • url (string) - URL path of the endpoint
  • method (string) - HTTP method (get, post, put, delete, patch)
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for processing requests

"http request" Node

The http request node is used to perform outgoing HTTP requests.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (http request)
  • name (string) - name of the node
  • url (string) - URL address for the request
  • method (string) - HTTP method (GET, POST, PUT, DELETE, etc.)
  • ret (string) - response format (obj, txt, bin)
  • headers (array) - array of request headers
  • paytoqs (string) - where to place the payload (body, query)
  • useAuth (boolean) - use authentication
  • authType (string) - type of authentication (basic, bearer)
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for processing the response

"http response" Node

The http response node is used to send HTTP responses back to the client.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (http response)
  • name (string) - name of the node
  • statusCode (number) - HTTP status code of the response
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections (usually empty)

"cms-events" Node

This node allows tracking events from the Events module and injecting them into the flow.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (cms-events)
  • name (string) - name of the node
  • eventMarker (string) - event identifier
  • property (string) - message property for processing
  • targetType (string) - type of target for processing (msg, flow, global)
  • x, y (number) - coordinates of the node on the workspace
  • z (string) - identifier of the tab to which the node belongs
  • wires (array) - array of connections for further processing

"admin-api" Node

This node allows interaction with various APIs.

Main Parameters:

  • id (string) - unique identifier of the node
  • type (string) - type of the node (admin-api)
  • name (string) - name of the node
  • path (string) - path of the API endpoint
  • method (string) - HTTP method (post, get, put, delete)
  • operation (string) - controller operation identifier
  • data (string) - request data in JSON format
  • wires (array) - array of connections for processing the response