Flows

API Calls for Node-RED Flows

Used get and set the full configuration the flows.

Get flows configuration

get
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Responses
200
Ok response
application/json
get
GET /api/v1/mobius/flow/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "id": "3423ebadc41ce452",
      "type": "tab",
      "label": "Flow 1",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "dd17eb69b4c36475",
      "type": "mobius connection",
      "host": "localhost",
      "port": "1890",
      "psk": "node-red"
    },
    {
      "id": "64328273c1ade1ed",
      "type": "mobius resource cov",
      "z": "3423ebadc41ce452",
      "name": "",
      "detailedOutput": false,
      "resource": "000001/020/000D/0001/40",
      "connection": "dd17eb69b4c36475",
      "x": 330,
      "y": 100,
      "wires": [
        [
          "19d9af2e1a4761ac"
        ],
        []
      ]
    },
    {
      "id": "19d9af2e1a4761ac",
      "type": "debug",
      "z": "3423ebadc41ce452",
      "name": "debug 1",
      "active": true,
      "tosidebar": true,
      "console": false,
      "tostatus": false,
      "complete": "false",
      "statusVal": "",
      "statusType": "auto",
      "x": 620,
      "y": 100,
      "wires": []
    }
  ]
}

Set flows configuration

put
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Body

Array of flow configurations

Other propertiesanyOptional
Responses
200
Ok response
application/json
put
PUT /api/v1/mobius/flow/{hid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 611

[
  {
    "id": "6aa8ab4d100707b8",
    "type": "tab",
    "label": "Pigs will fly",
    "disabled": false,
    "info": "",
    "env": []
  },
  {
    "id": "f3e2539aafeaa03c",
    "type": "azureiotdevice",
    "z": "6aa8ab4d100707b8",
    "deviceid": "A00001_021_012D_0001",
    "pnpModelid": "",
    "connectiontype": "dps",
    "authenticationmethod": "sas",
    "iothub": "",
    "isIotcentral": true,
    "scopeid": "0ne004C4815",
    "enrollmenttype": "device",
    "saskey": "UhjPQxY299AdQ3/TVL2kHFIi36a/cpWTUT/0BJvZjAg=",
    "certname": "",
    "keyname": "",
    "passphrase": "",
    "protocol": "mqtt",
    "retryInterval": 10,
    "methods": [],
    "DPSpayload": "",
    "gatewayHostname": "",
    "caname": "",
    "cert": "",
    "key": "",
    "ca": "",
    "x": 920,
    "y": 120,
    "wires": [
      []
    ]
  }
]
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": "OK"
}

Last updated