Back to forum list… Back to How Do I?...

Read Rest API Response and update database depending on response received (1 reply)

mlamboms
3 years ago
mlamboms 3 years ago

Trying to read REST response data and using response payload to update database. Tried to use JSON reader but not sure how to map the response payload in such a way that I can use it to update my database columns depending on what was received. From the logs this is the response received

 

2020-11-10 10:10:50:958 - RESPONSE Status - OK - POST - http://ThirdPartyendpoint

Content-Length - 175
Content-Type - application/json
Date - Tue, 10 Nov 2020 18:10:50 GMT
Server - Apache-Coyote/1.1
X-Powered-By - Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
Body - {"requestType":"DEPOSIT","mobileNo":123456789,"amount":3800.0,"errorCode":0,"respMsg":"Player account has been credited successfully.","depTxnId":318067,"tpTxnNo":"838827431"}

 

I need to use the above payload response depending on the values to update columns in my database.

 

Please help

 

Support
3 years ago
Support 3 years ago

mlamboms, this is reasonably easy, and can be configured by the 'Response Rewrite' functionality on the JSON writer.

https://www.realisable.co.uk/support/Documentation/iman-user-guide/Writers/JSON/ResponseRewrite.htm

There is also a section in our webservices training/cookbook stepping through an example.

https://www.realisable.co.uk/support/Documentation/integration-cookbook/Webservices/WriterRewriteResponse.htm

Once you have the values from the JSON response you can then use the DB Writer to update them to the database.

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close