# Send data from Ignition to another software

**URL:** <https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [July 26, 2019, 10:10am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900 "2019-07-26T10:10:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@Neo](https://forum.inductiveautomation.com/u/Neo)\
**Post date:** [July 26, 2019, 10:10am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/1 "2019-07-26T10:10:44Z")

</div>

We have a requirement where we need to send some data (like values entered on windows) to another software which exposes some web APIs/services. I know that using WebDev module in Ignition, we can write web service. Any other software can call that service to request the data. But in our requirement we need to send the data which getting any request from other software (probably on Button’s action performed event).

How can I do it in WebDev module? or anything else is required?

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [July 26, 2019, 10:55am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/2 "2019-07-26T10:55:21Z")

</div>

Please see my module RWS (restful web services) for two way communication with ignition from another application using webDev module. [https://pramanj.com/](https://pramanj.com/)

It can be customised to meet your requirements . It’s also possible to integrate remotely over internet using another module RMS from us which uses pubnub cloud services.

Please let me know your requirements

Regards  
[Www.pramanj.com](http://Www.pramanj.com)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 26, 2019, 11:29am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/3 "2019-07-26T11:29:00Z")

</div>

Sounds like you might just need the `system.net.httpGet` or `system.net.httpPost` scripting functions.

---

<div class="post-metadata">

**Author:** ![Neo](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@Neo](https://forum.inductiveautomation.com/u/Neo)\
**Post date:** [July 26, 2019, 11:58am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/4 "2019-07-26T11:58:14Z")

</div>

@Kevin.Herron  
Thank you for your reply. I checked the documentation for these functions. Description of both mentions about retrieving document from given URL. So it seems like it is retrieving data from somewhere rather than giving/sending it.  
Or as shown in the examples of system.net.httpPost, second parameter (postParams) can be used to send data from Ignition to the destination url/web service? And WebDev module required to use these functions?

---

<div class="post-metadata">

**Author:** ![GreggCavazos](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@GreggCavazos](https://forum.inductiveautomation.com/u/GreggCavazos)\
**Post date:** [July 26, 2019, 12:43pm UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/5 "2019-07-26T12:43:35Z")

</div>

As mentioned by @Kevin.Herron you can send data using either `system.net.httpGet` or `system.net.httpPost`, which one to use will depend on the service that will receive the call.

I don’t think you need the webdev module to be able to use those functions.

We have a Gateway Script with the function to do the call,

```auto
def UpdateData_API(MachineID,TagID,Value):
	try:
		myEndpoint = "http://server/api/exposedAPI.php?"
		myEndpoint += "MachineID=" + str(MachineID) + "&"
		myEndpoint += "TagID=" + str(TagID)+ "&"
		myEndpoint += "Value=" + str(Value)
		LogTraceMessage("UpdateData_API",myEndpoint)
	
		response = system.net.httpGet(myEndpoint)
		LogTraceMessage("UpdateData_API",str(response))
	except Exception, ex:
		LogErrorMessage("UpdateData_API", myEndpoint + " failed... Something went wrong..." + str(ex.message))

```

And to call it we use something like this;

```auto
        MachineID = "somevalue"
	TagID = "somevalue"
	Value = currentValue.value
	
	shared.GW_Scripts.UpdateData_API(MachineID,TagID,Value)

```

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [July 26, 2019, 1:41pm UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/6 "2019-07-26T13:41:34Z")

</div>

Using webDev on Ignition server, an external application can pull or request a data from Ignition server, and with `system.net.httpGet` or `system.net.httpPost` you can push the data from Ignition server (or client) into an external application thru the exposed end points in that server..

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 26, 2019, 3:33pm UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/7 "2019-07-26T15:33:08Z")

</div>

`system.net.httpPost` uses the [POST](https://en.wikipedia.org/wiki/POST_(HTTP)) HTTP verb, as the name implies. In basically every web API, POST is the way you submit data, and GET (ie, `system.net.httpGet`) is the way you retrieve data. “Proper” REST endpoints may also support PUT, PATCH, and other HTTP methods, but GET and POST covers probably 90% of cases.

You do _not_ need the Webdev module to use either function. WebDev serves the specific purpose of enabling you to use Ignition’s built-in webserver to build your own web APIs, or serve your own files, directly - but webdev endpoints are, by definition, the _target_ of other services, not the source.

---

<div class="post-metadata">

**Author:** ![Neo](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@Neo](https://forum.inductiveautomation.com/u/Neo)\
**Post date:** [July 28, 2019, 5:41am UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/8 "2019-07-28T05:41:17Z")

</div>

Thank you folks for your reply.

@paul-griffith Thank you for detailed reply. It clarified many questions. I got confused due to similar description (with word ‘retrieve’) for both httpPost and httpGet in 7.9 user manual and my limited knowledge of webservice/API stuff. It’s clear now.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [July 30, 2019, 8:21pm UTC](https://forum.inductiveautomation.com/t/send-data-from-ignition-to-another-software/26900/9 "2019-07-30T20:21:48Z")

</div>

@Neo Please also see our new [extension to RMS](http://forum.inductiveautomation.com/t/release-of-new-version-1-3-of-rmscada-module-from-pramanj-technologies/23934/8) module for interacting with Ignition remotely thru PubNub. It coulld be of some interest to you as well.

@paul-griffith Yes indeed system.net.httpPost/Get functions are more suited here but the end points have to be created in the other application. RWS may not be ideal here, though it can do the job in a round about way..

I haven't explored system.net.httpPost/Get functions but it does give me couple of ideas to try! Can these work across the firewall?

Thanks for the insight.
