Skip to Main Content

Cloud Platform

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!

Invalid query parameter value in MCS API

3424989May 8 2018 — edited May 8 2018

Hi,

I am calling rest connector from API.  Below is my code for calling rest connector.

service.get('/mobile/custom/BranchAPI/BranchList', function(req,res) {

var sdk = req.oracleMobile;

var statusCode = 200;

var optionsList= {};

optionsList.uri = "/mobile/connector/BranchConnector"+"/queryResults/?query=select id,branch_code,branch_name,branch_name_ara from ABC.Branch";

sdk.rest.get(optionsList,function(errConn, resConn,bodyConn){

if(errConn){

res.send(resConn.statusCode, errConn.message);

}else{

var bodyObject = JSON.parse(bodyConn);

//var currentObservation = bodyObject.items[0].rows;

var currentObservation = bodyObject;

res.send(statusCode, currentObservation);

}

})

});

When I test it, it trows error below.

{

  "type": "https://sample.com/services/rest/connect/exceptions/OSC-CREST-00019",

  "title": "Invalid query parameter value",

  "status": 400,

  "detail": "This query is not supported: near \"from\": syntax error",

  "instance": "https://sample.com/services/rest/connect/v1.3/queryResults/?query=select+id%2Cbranch_code%2Cbranch_name%2Cbranch_name_ara+from+ABC.Branch",

  "o:errorCode": "OSC-CREST-00019"

}

Comments