# API calls from Vision Client

**URL:** <https://forum.inductiveautomation.com/t/api-calls-from-vision-client/42069>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [January 8, 2021, 5:38pm UTC](https://forum.inductiveautomation.com/t/api-calls-from-vision-client/42069 "2021-01-08T17:38:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [January 8, 2021, 5:38pm UTC](https://forum.inductiveautomation.com/t/api-calls-from-vision-client/42069/1 "2021-01-08T17:38:39Z")

</div>

I am evaluating this device for possible use in one of the units we build.

> **[WFMN-ADi Wireless WiFi Equipment Runtime Hour Meter - Remote Control...](https://www.linortek.com/store/wifi-hour-meter-wireless-equipment-runtime-monitor-and-alert-system/)**
>
> With the WFMN-ADi, you can monitor the usage, impact, temperature, voltage and more to ensure proper maintenance and receive email notification or ​visual/audible alerts when service is required. ​It is a simple, reliable​, and affordable solution...

According to the mfgr I should be to be able to query the web based unit using an API call via TCP/IP.  
See the bottom of page 13 in this manual.  
[https://www.linortek.com/download/iTrixx-NHM-Instruction-Manual-Rev-B.pdf](https://www.linortek.com/download/iTrixx-NHM-Instruction-Manual-Rev-B.pdf)

My question is… Would it be possible for me to create a script in my HMI client that will fetch information from this device at a regular interval, possibly in a timer event in the Client Events?

Rudy

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [January 8, 2021, 6:18pm UTC](https://forum.inductiveautomation.com/t/api-calls-from-vision-client/42069/2 "2021-01-08T18:18:12Z")

</div>

Don’t see why not. You can checkout our documentation on the [system.net.httpClient()](https://docs.inductiveautomation.com/display/DOC81/system.net.httpClient) for some examples for doing API requests.

I would also note that if you _only_ need these API requests to happen on one screen, then you can also utilize the Timer component and do the API requests on its actionPerformed event handler. This way it won’t always be calling the endpoints just from having a client opened, but only when the window you have open requires it. However, if you will be utilizing the response in many different windows then you can use the Client Event timer script and then write the response to something like a Client Tag which can then be read and used on a window.
