Api Connector Node

This node allows you to send a HTTP request to an external Api via an alias.

Select the alias of the api connector you want to use to from the drop down and name your node.

By default, all response codes between 200 and 299 (2XX) will go out the top port and other response codes will go out the second last port. Errors will go out the last port.

The output nodes can be configured using the api response output mappings. Output nodes can be added/removed for either exact codes such as 403, or a range of codes such as 4XX. The final two output ports will always exist for errors and un-filtered codes.

You can map values into the request to the api using the Target/Source mappings. For example if you set the following

Target = Name Source = Botty The resulting mapping would be:

{Name: Botty}

Which could be mapped into the api request as follows:

   "requestMapping": { 
        "type": "requestBody",
        "requestBodyPath": "$.userName",
        "inputPath": "$.Name"

The result of the call will be available in msg.apiConnector.[nodeName] the following location, where nodeName is the name of the node. If we had a node named “Weather” for example, our result would loook like this:

    "msg" :{
      "apiConnector" :{
        "Weather": {
          "raining": false,
          "sunny": true,
          "temperature": 18

If the node name is not set, the alias of the api Connector will be used in its place.