+ Start a Discussion
ndrannapareddyndrannapareddy 

Requirements to Gather Before Making a thirdParty Rest Call

Can anyone give me an Idea what is the information

i need to take from the thirdParty RestProvider to access the Rest Service . 

 

Like Reqirements gathering ..??

 

Ashish_SFDCAshish_SFDC

Hi Dinesh,

 

You need to use HTTP callout 

 

public class AuthCallout {

 public void basicAuthCallout(){
 HttpRequest req = new HttpRequest();
 req.setEndpoint('http://www.yahoo.com');
 req.setMethod('GET');

 // Specify the required user name and password to access the endpoint 

 // As well as the header and header information 


 String username = 'myname';
 String password = 'mypwd';

 Blob headerValue = Blob.valueOf(username + ':' + password);
 String authorizationHeader = 'BASIC ' +
 EncodingUtil.base64Encode(headerValue);
 req.setHeader('Authorization', authorizationHeader);

 // Create a new http object to send the request object 

 // A response object is generated as a result of the request   


 Http http = new Http();
 HTTPResponse res = http.send(req);
 System.debug(res.getBody());
  }
 }

http://salesforce.stackexchange.com/questions/5182/how-to-make-a-post-request-to-some-other-server-f... 

 

See the detailed documentation below and reply back if you are looking at anything specific, 

 

http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API

 

 

Regards,
Ashish

ndrannapareddyndrannapareddy

Thanks Ashish that defenitely helps me understand how to use the Code base. 

But i am looking at the high end information i need to gather from thirdparty vendor to actully Code in Salesforce ..

 

Just lilke i know i have to get the Details of other Org ..

 

when calling giving Out Salesforce RestService URL .. i will have to provide the comsumers

UserName Password ,client Id and Secret id along with mapping URL . 

 

When i wanted to Call a Rest Service that is Coded in java apart from End Point URI what are the other paramenters i need from them so that i can make a succesfull connection with the system.. 

 

 

 

Ashish_SFDCAshish_SFDC
Hi Dinesh, 

Are you trying to get the details from 3rd party client into Salesforce or Salesforce data into 3rd party App.

Regards,
Ashish