# SAP to local database through API request

**URL:** <https://forum.inductiveautomation.com/t/sap-to-local-database-through-api-request/104546>\
**Category:** Ignition\
**Created:** [April 1, 2025, 7:00pm UTC](https://forum.inductiveautomation.com/t/sap-to-local-database-through-api-request/104546 "2025-04-01T19:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aval.patel](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@aval.patel](https://forum.inductiveautomation.com/u/aval.patel)\
**Post date:** [April 1, 2025, 7:00pm UTC](https://forum.inductiveautomation.com/t/sap-to-local-database-through-api-request/104546/1 "2025-04-01T19:00:30Z")

</div>

My goal is to transfer data in JSON format from the SAP server to a local SQL database, after which Ignition will communicate with the database to retrieve the associated value. They wish to send data via API. What's the best course of action here? I have never before worked with an API.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 1, 2025, 7:10pm UTC](https://forum.inductiveautomation.com/t/sap-to-local-database-through-api-request/104546/2 "2025-04-01T19:10:12Z")

</div>

Which end will call the API?

If you intend for the SAP system to **push** date to Ignition by calling an API offered by Ignition, you will need to create that API. The typical method to do so is to use Ignition's WebDev module and attach suitable jython scripts to endpoints.

If you intend for Ignition to **pull** this data from SAP, this can be done with the Ignition Platform's native scripting functionality, particularly `system.net.httpClient()`.

Share more information?

---

<div class="post-metadata">

**Author:** ![aval.patel](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@aval.patel](https://forum.inductiveautomation.com/u/aval.patel)\
**Post date:** [April 1, 2025, 7:26pm UTC](https://forum.inductiveautomation.com/t/sap-to-local-database-through-api-request/104546/3 "2025-04-01T19:26:40Z")

</div>

I am using web dev module so that SAP can push data.  
Created this script to show data in Perspective table.

def doPost(request, session):  
data= request['data']  
system.perspective.sendMessage('table-data', payload = {'data':data},scope='session',sessionId = '3d5297b0-7a38-47bf-92a7-a9488d57e880')  
return{'response': 'success'}

and wrote script in table too,  
def onMessageReceived(self, payload):  
data = payload['data']  
self.props.data = data  
# implement your handler here

But my end goal is to move this data into database.

Thanks,
