Am Novice
Am Novice

Reputation: 325

Querying SalesForce DB Records using REST API

I have tried implementing like this to get data from SalesForce DB using the REST api,

uri= ...."/query?q=Select+Acc_Name__c+From+Account__c+where+Acc_ID__c+=+'123456'+Limit+5

HttpGet httpGet = new HttpGet(uri);

This is the syntax i found in here

URI
/vXX.X/query/?q=SOQL query

while this works, I don't really want to expose my query like this in uri, Is there an another efficient way to achieve the same operation using REST api ?

Upvotes: 0

Views: 665

Answers (1)

Matt Kaufman
Matt Kaufman

Reputation: 808

You can't modify the way the REST API works. You can implement your own methods via an Apex Restful Web Service. This would allow you to define a method that receives the querystring via a POST (you could even encrypt it first if you wanted to).

Exposing Apex Classes as RESTful Web Services

Upvotes: 0

Related Questions