Thursday 30 August 2012

Apex REST


You can create custom REST Web service APIs on top of the Force.com platform or Database.com by exposing your Apex classes as REST resources. Client applications can call the methods of your Apex classes using REST to run Apex code in the platform.
Apex REST supports both XML and JSON for resource formats sent in REST request and responses. By default, Apex REST uses JSON to represent resources.
For authentication, Apex REST supports OAuth 2.0 and the Salesforce session. This tutorial uses Workbench to simulate a REST client. Workbench uses the session of the logged-in user as an authentication mechanism for calling Apex REST methods.
Note
Workbench is a free, open source, community-supported tool (see the Help page in Workbench). Salesforce.com provides a hosted instance of Workbench for demonstration purposes only—salesforce.com recommends that you do not use this hosted instance of Workbench to access data in a production database. If you want to use Workbench for your production database, you can download, host, and configure it using your own resources.

No comments:

Post a Comment