Have a look this will load all the flows into the editor
and upload them to the file system.
Note;
after you edit the msg and upload it, NR needs to deploy/ restart before change will be seen in Dashboard
[
{
"id": "2756ff49.7a67",
"type": "debug",
"z": "7952336614d75e58",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1030,
"y": 220,
"wires": []
},
{
"id": "b93f6d0a.9aca3",
"type": "inject",
"z": "7952336614d75e58",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{}",
"payloadType": "json",
"x": 110,
"y": 120,
"wires": [
[
"b96df551.e84528"
]
]
},
{
"id": "e2cfaaa6.081f68",
"type": "http request",
"z": "7952336614d75e58",
"name": "POST /auth/token",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://localhost:1880/auth/token",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"headers": [],
"x": 450,
"y": 120,
"wires": [
[
"ec48a95e.ec3ee8"
]
]
},
{
"id": "b96df551.e84528",
"type": "change",
"z": "7952336614d75e58",
"name": "",
"rules": [
{
"t": "set",
"p": "payload.client_id",
"pt": "msg",
"to": "node-red-editor",
"tot": "str"
},
{
"t": "set",
"p": "payload.grant_type",
"pt": "msg",
"to": "password",
"tot": "str"
},
{
"t": "set",
"p": "payload.scope",
"pt": "msg",
"to": "*",
"tot": "str"
},
{
"t": "set",
"p": "payload.username",
"pt": "msg",
"to": "YOUR USER NAME",
"tot": "str"
},
{
"t": "set",
"p": "payload.password",
"pt": "msg",
"to": "YOUR PASSWORD",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 260,
"y": 120,
"wires": [
[
"e2cfaaa6.081f68"
]
]
},
{
"id": "d5b253f4.a73b9",
"type": "change",
"z": "7952336614d75e58",
"name": "",
"rules": [
{
"t": "set",
"p": "token",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 120,
"wires": [
[
"672dcc9f.b60984"
]
]
},
{
"id": "ec48a95e.ec3ee8",
"type": "json",
"z": "7952336614d75e58",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 610,
"y": 120,
"wires": [
[
"77702c60.df33e4"
]
]
},
{
"id": "df2e5d9c.3664a",
"type": "http request",
"z": "7952336614d75e58",
"name": "GET /flows",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://localhost:1880/flows",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"headers": [],
"x": 510,
"y": 220,
"wires": [
[
"398be1ed.e0ffce"
]
]
},
{
"id": "672dcc9f.b60984",
"type": "change",
"z": "7952336614d75e58",
"name": "",
"rules": [
{
"t": "delete",
"p": "headers",
"pt": "msg"
},
{
"t": "set",
"p": "headers.Authorization",
"pt": "msg",
"to": "token.access_token",
"tot": "flow"
},
{
"t": "set",
"p": "headers.Node-RED-API-Version",
"pt": "msg",
"to": "v2",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 220,
"wires": [
[
"df2e5d9c.3664a"
]
]
},
{
"id": "398be1ed.e0ffce",
"type": "change",
"z": "7952336614d75e58",
"name": "",
"rules": [
{
"t": "delete",
"p": "headers",
"pt": "msg"
},
{
"t": "set",
"p": "headers.Authorization",
"pt": "msg",
"to": "token.access_token",
"tot": "flow"
},
{
"t": "set",
"p": "headers.Node-RED-API-Version",
"pt": "msg",
"to": "v1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 720,
"y": 240,
"wires": [
[
"f03c48f9.385fc8"
]
]
},
{
"id": "ddff717.ad4279",
"type": "comment",
"z": "7952336614d75e58",
"name": "Change user/pass below",
"info": "",
"x": 260,
"y": 80,
"wires": []
},
{
"id": "77702c60.df33e4",
"type": "function",
"z": "7952336614d75e58",
"name": "Bearer",
"func": "msg.payload.access_token = \"Bearer \" + msg.payload.access_token\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 750,
"y": 120,
"wires": [
[
"d5b253f4.a73b9"
]
]
},
{
"id": "f03c48f9.385fc8",
"type": "http request",
"z": "7952336614d75e58",
"name": "POST /flows",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://localhost:1880/flows",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"headers": [],
"x": 890,
"y": 220,
"wires": [
[
"2756ff49.7a67"
]
]
}
]