# How to call API Based on condition

**URL:** <https://discourse.nodered.org/t/how-to-call-api-based-on-condition/64940>\
**Category:** Hardware\
**Tags:** http-request\
**Created:** [11 July 2022 11:38 UTC](https://discourse.nodered.org/t/how-to-call-api-based-on-condition/64940 "2022-07-11T11:38:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_98](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@Rahul\_98](https://discourse.nodered.org/u/Rahul_98)\
**Post date:** [11 July 2022 11:38 UTC](https://discourse.nodered.org/t/how-to-call-api-based-on-condition/64940/1 "2022-07-11T11:38:43Z")

</div>

Hello  
I should call the API based on condition. we will be getting the tag data from edge device when Tag1 value changes the API should send the data .I am not getting how to configure this problem could u please help me out ..``[  
{  
"id": "f6d67796e561161d",  
"type": "function",  
"z": "1934b69fd66fe8ff",  
"name": "",  
"func": "msg.payload=msg.payload.ignitionResult.values[0]\nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 720,  
"y": 60,  
"wires": [  
[  
"364d0c38e9be60f2",  
"f3bf0ccb5a652f28"  
]  
]  
}  
]  
`

---

<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:** [9 September 2022 11:39 UTC](https://discourse.nodered.org/t/how-to-call-api-based-on-condition/64940/2 "2022-09-09T11:39:20Z")

</div>

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