# How to call API on event based

**URL:** <https://discourse.nodered.org/t/how-to-call-api-on-event-based/64998>\
**Category:** Hardware\
**Tags:** http-request\
**Created:** [12 July 2022 10:04 UTC](https://discourse.nodered.org/t/how-to-call-api-on-event-based/64998 "2022-07-12T10:04:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [12 July 2022 11:09 UTC](https://discourse.nodered.org/t/how-to-call-api-on-event-based/64998/2 "2022-07-12T11:09:53Z")

</div>

I think your problem is similar to this one:

> [@Falling edge detection with JSON payload](https://discourse.nodered.org/t/falling-edge-detection-with-json-payload/64920):
>
> I have some sensors that are set up to send their data via MQTT to NR in JSON format. When they detect, they appear similar to: [image] I want to send an email notification when the battery drops below the warn threshold. Basically, when a battery is new, it reports as battery\_ok=1. When it gets below whatever Acurite determines warning level, it switches to battery\_ok=0. I can detect this with a falling edge node easily by using a change node to break the battery\_ok value out, but then I …

---

_[View the full topic](https://discourse.nodered.org/t/how-to-call-api-on-event-based/64998)._
