Rest API response question

Hi folks,

I try to build a dashboard of sensors / values within Node Red. I tested the GET call in Insomnia:


As you can see, I receive the response with all the values I need.
So I tried to do the same in Node Red:


I receive the right amount of arrays (all the different sensors), but the difference is, that I don't receive the same results. Any ideas why?

Try adding the same headers that are present on the 1st (postman?) tool to the HTTP-Request node

I see the following headers / values on the working request in Insomnia:
"measuringPointId": "75z2w",
"channelName": "Zuluft 1",
"value": "19.1",
"unit": "°C",
"isoValue": "19.1",
"isoUnit": "°C",
"timestamp": "2025-02-05T09:30:00Z"

But in the nodered debug it's only them:
measuringPoints: array[14]
[0 … 9]
0: object
id: "75z2w"
name: "Zuluft 1"
description: "T2_45858433_1"
group: "Zuluft"
area: "Rottehalle"

Is there any documentation on how the format for the header should be?

Open the Headers section on your test app (it has a (3) badge suggesting there are 3 headers set on your test API call)

Add those 3 to node-red http-request node.

You mean documentation for headers in node red?

Set a request header : Node-RED

That's one way or, just do what I said before

Thanks Steve, but that's not what we're looking for

Okay, was worth a try. Most curious.

Obvious questions:

Are you 100% certain the URL is the same in your application and in node-red? Copy and paste both into a text editor on two lines and inspect them closely.

What versions of node js and node red are you using?

Are you processing the data after the request node?

Can you share a screenshot of your flow?

Would you be willing to share the URL & token so I can try (obviously you would send this privately in a direct message)

1 Like

let me check this :+1:

There you go!!!

The URL in Insomnia is https://europe.saveris.net/SaverisConnector/ws/api/saveris/v1/measuringPoint/value

and in Node Red the value was missing. As the URL was not visible completely I missed that! And I don't know, how this happened as I was sure (at least thought it) that I cpoied the URL from Insomnia!

Anyways, great catch and another layer 8 user fail :see_no_evil:

THANK YOU SO MUCH!

1 Like