# Rest API response question

**URL:** https://discourse.nodered.org/t/rest-api-response-question/95144
**Category:** General
**Created:** [5 February 2025 10:20 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144 "2025-02-05T10:20:59Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![BH-HomeAssistant](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bh-homeassistant/32/98586_2.png) [@BH-HomeAssistant](https://discourse.nodered.org/u/BH-HomeAssistant)
#### Post date: [5 February 2025 10:20 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/1 "2025-02-05T10:20:59Z")

</div>

Hi folks,

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4a46537def57d36834cbc517b554feb0da41d97.png)  
As you can see, I receive the response with all the values I need.  
So I tried to do the same in Node Red:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e877b1a343a3ded09154be2cec7ff2a281f0c21.png)  
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?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 February 2025 10:37 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/2 "2025-02-05T10:37:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![BH-HomeAssistant](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bh-homeassistant/32/98586_2.png) [@BH-HomeAssistant](https://discourse.nodered.org/u/BH-HomeAssistant)
#### Post date: [5 February 2025 12:11 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/3 "2025-02-05T12:11:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/d/ed3193f2430c845509cfd39372a589d93a694593.png)

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?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 February 2025 19:33 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/4 "2025-02-05T19:33:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [5 February 2025 20:04 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/5 "2025-02-05T20:04:58Z")

</div>

You mean documentation for headers in node red?

[Set a request header : Node-RED](https://cookbook.nodered.org/http/set-request-header)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 February 2025 21:51 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/6 "2025-02-05T21:51:55Z")

</div>

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

> [@Steve-Mcl](#):
>
> 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

 ![share_8200776594837032071](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a62cca7c34ac84e27da0470bef579ce99d5a5260.png)

---

<div class="post-metadata">

### Author: ![BH-HomeAssistant](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bh-homeassistant/32/98586_2.png) [@BH-HomeAssistant](https://discourse.nodered.org/u/BH-HomeAssistant)
#### Post date: [6 February 2025 07:07 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/7 "2025-02-06T07:07:34Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b2d313d8c2bd9a9d78bdef767b83d3403879ada3.png)

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 February 2025 07:55 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/8 "2025-02-06T07:55:17Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![BH-HomeAssistant](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bh-homeassistant/32/98586_2.png) [@BH-HomeAssistant](https://discourse.nodered.org/u/BH-HomeAssistant)
#### Post date: [6 February 2025 08:07 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/9 "2025-02-06T08:07:30Z")

</div>

let me check this 👍

---

<div class="post-metadata">

### Author: ![BH-HomeAssistant](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bh-homeassistant/32/98586_2.png) [@BH-HomeAssistant](https://discourse.nodered.org/u/BH-HomeAssistant)
#### Post date: [6 February 2025 08:12 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/10 "2025-02-06T08:12:10Z")

</div>

There you go!!!

The URL in Insomnia is [https://europe.saveris.net/SaverisConnector/ws/api/saveris/v1/measuringPoint/value](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 🙈

THANK YOU SO MUCH!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [20 February 2025 08:12 UTC](https://discourse.nodered.org/t/rest-api-response-question/95144/11 "2025-02-20T08:12:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
