Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REST API POST Method call from JET

SharmaRishuDec 11 2019 — edited Dec 12 2019

Hi Expert ,

I am new to jet and doing some POC in this. I am able to fetch the data from REST API. Now My challenge is to insert the same data into Oracle database table. I think only option is POST method where we can save data into Database table. Also I need to pass the parameter to rest api to get particular record. I am doing following with hardcode parametter but not sure how to pass select list values as parameter into here.

var self = this;

      var curr = 'USD_PHP';   -------  I need this value should be pass from page select list value.

        self.data = ko.observableArray();

        $.getJSON("https://free.currconv.com/api/v7/convert?q="+curr+"&compact=ultra&apiKey=f6cf3bffce72207c8d1f").

        then(function (convert) {

            $.each(convert, function () {

                self.data.push({

                    USD_PHP: this

                  

                });

            });

        });

I tried different options but may be there is issue with my approach which is preventing me to save this rest api data into Oracle table.

I am able to show data like below.

<oj-table id="table" summary="Currency List"

        aria-label="Currency Table"

        data='[[dataProvider]]'

                  columns='[{"headerText": "USD_PHP",

                  "field": "USD_PHP"}]'>

</oj-table>

Now same data I want to save into Oracle table. Please help me on this.

Kind Regards,

Harish Sharma

Comments
Post Details
Added on Dec 11 2019
3 comments
854 views