I guess should be something like this...
[{"id":"4106d02f.a1315","type":"debug","z":"4c5509ca.d3c3a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":730,"y":1480,"wires":[]},{"id":"7a4d8750.810318","type":"inject","z":"4c5509ca.d3c3a8","name":"","topic":"","payload":"/api/printer/tool?history=true&limit=2","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":1480,"wires":[["6cab1195.8fbfa"]]},{"id":"6cab1195.8fbfa","type":"http request","z":"4c5509ca.d3c3a8","name":"","method":"GET","ret":"obj","url":"http://192.168.1.156?api_key=C69966D056AF4ED88F48ADB119CF16B1 ","tls":"","x":480,"y":1500,"wires":[["4106d02f.a1315"]]}]
However the response I get is:
msg : Object
object
_msgid: "1494f902.40e927"
topic: ""
payload: string
<html>
<head>
<title>OctoPrint Login</title>
<!-- le CSS -->
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="/static/vendor/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/plugin/forcelogin/static/css/forcelogin.css">
<!-- le javascript -->
<script>
var BASE_URL = "/";
</script>
<script src="/static/js/lib/jquery/jquery.min.js"></script>
<script src="/static/js/lib/sockjs.min.js"></script>
<script src="/static/js/lib/bootstrap/bootstrap.js"></script>
<script src="/static/js/lib/lodash.min.js"></script>
<script type="text/javascript" src="/static/webassets/packed_client.js?4965268c"></script>
<script src="/plugin/forcelogin/static/js/main.js"></script>
</head>
<body>
<div class="container">
<form class="form-signin">
<h2 class="form-signin-heading">Please log in</h2>
<div id="login...
statusCode: 200
headers: object
content-length: "2095"
x-robots-tag: "noindex, nofollow, noimageindex"
set-cookie: array[1]
last-modified: "Wed, 30 Jan 2019 00:19:14 GMT"
etag: ""fc0f9581859fa4f96170ce4bef53bd29b18bc096""
x-from-cache: "true"
x-clacks-overhead: "GNU Terry Pratchett"
content-type: "text/html; charset=utf-8"
connection: "close"
x-node-red-request-node: "4a0648d3"
responseUrl: "http://192.168.1.156/?api_key=C69966D056AF4ED88F48ADB119CF16B1"
responseCookies: object
session_P80: object
As per WIKI http://docs.octoprint.org/en/master/api/printer.html#retrieve-the-current-tool-state
I was expecting to get something like:
HTTP/1.1 200 OK
Content-Type: application/json
{
"tool0": {
"actual": 214.8821,
"target": 220.0,
"offset": 0
},
"tool1": {
"actual": 25.3,
"target": null,
"offset": 0
},
"history": [
{
"time": 1395651928,
"tool0": {
"actual": 214.8821,
"target": 220.0
},
"tool1": {
"actual": 25.3,
"target": null
}
},
{
"time": 1395651926,
"tool0": {
"actual": 212.32,
"target": 220.0
},
"tool1": {
"actual": 25.1
}
}
]
}
Frankly speaking I have no idea how that works and I'm trying to get some point to start with.
Regards