Skip to main content
Skip table of contents

Configure qibb Nodes and Subflows

Introduction

qibb is offering a variety of specialized API nodes to help you automate your media-centric workflows.

Furthermore, our Flows Catalog provides a selection of small workflows that can be combined together to create more complete and tailor-made workflows.

Both the API nodes and the flows are requiring for the user to fill out a couple of configuration parameters, that need to be set beforehand.

Instructions

There are two ways to configure both the API Nodes and the Flows:

  1. double-click on the node/sub-flow and fill out the required parameters in the Edit dialogue box

  2. or they can pass them programmatically using a Change Node or a Function Node in Node-Red.

Edit Dialogue Box Configuration

The first option is straightforward. You just need to double-click over the node or the sub-flow and fill out the required configuration parameters directly there as shown on the screenshot below.

Sub-flow Edit Dialogue Box

Programmatic Delivery of Configuration Parameters

Sometimes it makes more sense to pass the configuration parameters programmatically. This can be done either using a Change Node or a Function Node in Node-Red.

For example, the mimir Auth Node requires that the email and password are pre-configured. Normally, the path and the parameter name are shown on the Node/Sub-flow documentation page, as shown below.

mimir Auth Node Documentation

So you need to define them either by using a Change Node:

Set-Up Configuration Parameters Using Change Node

This would create a path in Node-Red with the following format:

JSON
msg.auth = {
  "MIMIR_USERNAME": "username",
  "MIMIR_PASSWORD": "password"
}

Alternatively, you can also use a function node to achieve the same and define the structure of the JSON path yourself:

Set-Up Configuration Parameters Using Function Node

Path, Query, Headers and Body Parameters

You can use the same ways to set-up API path, query, headers and body parameters. For example imagine we have the following API request we want to send: POST /api/teams/{teamId}?{query_param}={query_value} and pass an X-API-Key value in the headers and pass a JSON body.

  • path parameter should be passed at msg.parameters.path.teamId = "team ID"

  • query parameter should be passed at msg.parameters.query.query_param = "query_value"

  • API Key headers msg.headers.X-API-Key = "<jwt_token>"

  • JSON body needs to be passed to msg.parameters.body.XXXX = "value", etc.
    Alternatively, for the JSON body, you can use a function node where you need to define it yourself:

    JSON
    msg.parameters.body = {
      "param_name1": "value1",
      "param_name2": "value2",
      ...
    };

Function Node Disclaimer

It is important to note that when using a function node, you cannot simply set msg.auth.MIMIR_USERNAME = "username" as this would throw a Type Error: “ "TypeError: Cannot set properties of undefined (setting ‘username')" as the msg.auth path won’t be initialized. In that case you should use:

  • JSON
    msg.auth = {
      "MIMIR_USERNAME": "username",
      "MIMIR_PASSWORD": "password"
      ...
    };

    or:

    JSON
    msg.auth = {};
    msg.auth.MIMIR_USERNAME = "username";
    msg.auth.MIMIR_PASSWORD = "password";
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.