I had a deeper look and found that your code simply asks for the html code at a node on the datalayer. This is also given back, but the JSON parser cannot interpret this as a JSON object so you get the error shown.
ctrlX Node-RED customer flow JSON parse error
Please have a look to the blog post "Using REST API of ctrlX CORE" to see how the basics work.
... View more