pmfernandes

NodeRed - Get Proxmox Server

Feb 13th, 2021 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.33 KB | None | 0 0
  1. [
  2.   {
  3.     "id": "aaffe7b5.273fb8",
  4.     "type": "inject",
  5.     "z": "a9895dd4.ee6cf",
  6.     "name": "",
  7.     "props": [
  8.       {
  9.         "p": "payload"
  10.       },
  11.       {
  12.         "p": "headers[\"content-type\"]",
  13.         "v": "application/x-www-form-urlencoded",
  14.         "vt": "str"
  15.       },
  16.       {
  17.         "p": "rejectUnauthorized",
  18.         "v": "false",
  19.         "vt": "bool"
  20.       }
  21.     ],
  22.     "repeat": "",
  23.     "crontab": "",
  24.     "once": false,
  25.     "onceDelay": 0.1,
  26.     "topic": "",
  27.     "payload": "{\"username\":\"root@pam\",\"password\":\"123456789\"}",
  28.     "payloadType": "json",
  29.     "x": 100,
  30.     "y": 620,
  31.     "wires": [
  32.       [
  33.         "f39fa33d.e5632"
  34.       ]
  35.     ]
  36.   },
  37.   {
  38.     "id": "fef8d661.a3e8a8",
  39.     "type": "debug",
  40.     "z": "a9895dd4.ee6cf",
  41.     "name": "",
  42.     "active": true,
  43.     "tosidebar": true,
  44.     "console": false,
  45.     "tostatus": false,
  46.     "complete": "true",
  47.     "targetType": "full",
  48.     "statusVal": "",
  49.     "statusType": "auto",
  50.     "x": 520,
  51.     "y": 620,
  52.     "wires": []
  53.   },
  54.   {
  55.     "id": "f39fa33d.e5632",
  56.     "type": "http request",
  57.     "z": "a9895dd4.ee6cf",
  58.     "name": "Proxmox | Get Token",
  59.     "method": "POST",
  60.     "ret": "obj",
  61.     "paytoqs": "ignore",
  62.     "url": "https://192.168.1.235:8006/api2/json/access/ticket",
  63.     "tls": "",
  64.     "persist": false,
  65.     "proxy": "",
  66.     "authType": "",
  67.     "x": 140,
  68.     "y": 740,
  69.     "wires": [
  70.       [
  71.         "4f9a28e8.6363b8"
  72.       ]
  73.     ]
  74.   },
  75.   {
  76.     "id": "4f9a28e8.6363b8",
  77.     "type": "function",
  78.     "z": "a9895dd4.ee6cf",
  79.     "name": "Write Cookie",
  80.     "func": "$token = msg.payload.data.ticket;\n\nmsg.cookies =\n{\n    \"PVEAuthCookie\": $token\n    \n};\n\nreturn msg;",
  81.     "outputs": 1,
  82.     "noerr": 0,
  83.     "initialize": "",
  84.     "finalize": "",
  85.     "x": 360,
  86.     "y": 740,
  87.     "wires": [
  88.       [
  89.         "f6e33aa4.26c068"
  90.       ]
  91.     ]
  92.   },
  93.   {
  94.     "id": "f6e33aa4.26c068",
  95.     "type": "http request",
  96.     "z": "a9895dd4.ee6cf",
  97.     "name": "Proxmox | Get Status",
  98.     "method": "GET",
  99.     "ret": "obj",
  100.     "paytoqs": "ignore",
  101.     "url": "https://192.168.1.235:8006/api2/json/nodes/pmfernandes/status/",
  102.     "tls": "",
  103.     "persist": false,
  104.     "proxy": "",
  105.     "authType": "",
  106.     "x": 570,
  107.     "y": 740,
  108.     "wires": [
  109.       [
  110.         "fef8d661.a3e8a8"
  111.       ]
  112.     ]
  113.   }
  114. ]
Add Comment
Please, Sign In to add comment