REST API example in Salesforce

Representational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web. REST has emerged as a predominant web service design model.

REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources.

The Force.comREST API provides you with a powerful, convenient, and simple Web services API for interacting with Its advantages include ease of integration and development, and it is an excellent choice of technology for use with mobile applications and Web 2.0 projects. However, if you have large numbers of records to process, you may wish to use Bulk API, which is based on REST principles and optimized for large sets of data.

Follow the below steps to experience REST call from JAVA to

1. Open eclipse. Go to Window --> Preferences.

2. Go to JAVA --> Build Path --> User Libraries and click "New" button.

3. Give a name and click "OK" button.

4. Click "Add JARs" button. Add the JARs in the below Zip file and click "Ok" button.

Zip file for JARs : Click here to download.

5. Go to File --> New --> JAVA Project.

6. Give a name to the project and click "Finish" button.

7. Right click the project and go to Build Path --> Add Libraries.

8. Select "User Library".

9. Select the Library created and click "Finish" button.

10. Right click the Project --> New --> Package.

11. Give a name to the Package and click "Finish" button.

12. Right click the Package --> New --> Class.

13. Give a name to the class and click "Finish" button.

Use the below links for sample JAVA classes for REST API 

No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit