Showing results for 
Search instead for 
Did you mean: 

Node red http request to ctrlX CORE System API

Long-established Member

Node red http request to ctrlX CORE System API

I'm trying to command a GET request to the ctrlX System API, using Node Red.  I'm trying to read the tempCpu variable.

Working: issuing command from localhost, ie: Node Red running on the same CORE where I am directing the GET request.  You can see the flow and the result in the working.png picture and FlowWorking.txt files attached.

Not Working: issuing the same command from a different device, trying to issue the GET request to the other CORE IP address.

For the GET request, I get this error:

"Error: error:0909006C:PEM routines:get_name:no start line :"

I tried a variety of different ways of using certificates, keys and tokens to get the command to work, but none have worked.  I used the certificates and keys, in various combinations from the "Web Server" section of certificates and keys on the CORE, of whose temperature I would like to read. 

I looked at the documentation on the REST API that described obtaining the bearer token.  I tried this in YARC and it works fine.  The same POST command from Node Red also returns a similiar error such as this one:

"Error: error:0909006C:PEM routines:get_name:no start line :"

I have seen Node Red examples elsewhere for data layer, but nothing for the APIs, like the System API.

I'm out of ideas...any advice or code examples of how to do this?


Community Moderator

Re: Node red http request to ctrlX CORE System API

  1. why don't you use the standard ctrlX contribution nodes available in NodeRed and GitHub?
    There is also an example how to read the actual CPU utilisation.

  2. You can get a token like you do with the YARC also in NodeRed:
    1. I build up my message:
      var newMsg = {};
      newMsg.header = {};
      newMsg.header["Content-Type"] = "application/json"
      newMsg.payload = 
      {name: boschrexroth, password: boschrexroth}
      newMsg.url = "";
      return newMsg;​
    2. And then activate SSL/TLS and send a POST:




Long-established Member

Re: Node red http request to ctrlX CORE System API

To answer your questions:

1. The ctrlX contribution nodes seem to be only for the data layer.  I am trying to use the System API.  I tried this anyway, to be sure, but the reads failed in a couple of different configurations:


2. I tried your suggestion but I get an error I was also getting before.  I did not mention it, but I had this error when trying to use the certificate settings in the Node Red HTML node: 


I must admit that I am not very knowledgable (yet) on REST API authentication and when to use certificates, keys, tokens, etc.  This test is my effort to learn about it more.



Community Moderator

Re: Node red http request to ctrlX CORE System API

I just tested the way described by me again in an new set up ubuntu and everything works fine.

Please send me a private message with your contact data then I can have a look to your application.