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!

Passing Query Parameters in REST Service Call

su398506rtSep 19 2020 — edited Sep 24 2020

Hi,

Can anyone tell me or provide a short example on how I can perform a REST service query whereby I pass a several parameters ideally in the body of a Json object.

Examples I have found so far all seem to use a single identifier like employeeId.

I did find this example below by Chris Muir where an employeeId:3 is in the parameters of the EmpModelDef, I wondered if this example could be expanded with additional parameters?

var findEmp = new self.EmpModelDef({employeeId:3}, employees);

var emp = findEmp.fetch({

            success: function(model, response, options) {

// model = fetched object 

console.log("employee.fetch success");   

},     

error: function(model, xhr, options) {

console.log("employee.fetch error");     

}});

I’m relatively new to Jet and am trying to figure out the best practices in achieving the functionality needed for my project. Any pointers would be much appreciated.

Regards

G Cannell

Comments
Post Details
Added on Sep 19 2020
1 comment
476 views