REST API provides a powerful, convenient, and simple Web
services API for interacting with Force.com. Its advantages include ease of
integration and development, and it’s an excellent choice of technology for use
with mobile applications and Web 2.0 projects.
A REST resource is an abstraction of a piece of information,
such as a single data record, a collection of records, or even dynamic
real-time information. Each resource in the Force.com REST API is identified by
a named URI, and is accessed using standard HTTP methods (HEAD, GET, POST,
PATCH, DELETE). The Force.com REST API is based on the usage of resources,
their URIs, and the links between them. You use a resource to interact with
your Salesforce or Force.com organization. For example, you can:
- Retrieve summary information about the API versions available to you.
- Obtain detailed information about a Salesforce object such as an Account or a custom object.
- Obtain detailed information about Force.com objects, such as User or a custom object.
- Perform a query or search.
- Update or delete records.
In this
blog, I will be explaining how to interact with Salesforce using REST API. I will be creating a VF page named as “RESTAPIPlayground”.
On this page you can specify different parameters which is required to send
HTTPRequest like Access token, end point URL (URI), HTTP method etc. VF page
will display the response from Salesforce and will also display the Apex code
to send HTTPRequest.
Here I
assume that you are aware of how to generate access token from salesforce using
oAuth2.0. If you want to learn this first then refer to my earlier blog:
Once you
have access token of salesforce with which you want to interact then you can
use this playground (VF Page) to play with different options available under
REST API.
Create a Apex class "RESTAPIPlaygroundController" and VF Page "RESTAPIPlayground". Below is code for Apex Class and VF page.
Below is snapshot of REST API Playground. You can specify the Access_Token, REST API service URI (endpoint URL), HTTP method and content type (json or xml), request body (in case of patch and post method). Once you click on send request, system will display the HTTP response.
Note: Add the REST API service URI (end point URL) to remote site settings before sending HTTPRequest.
Sunil Can u please send me same like How can i get the SOAP Response .Please send me code If u possible bcz of i am new in webservices. nagarajuu.c@gmail.com
ReplyDeleteThanks
Raj
Great Article Cloud Computing Projects
DeleteNetworking Projects
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
In VF page, there is section which display response when you send HTTP request. Apex code is generated for request and response on right side of VF page. Please refer that.
ReplyDeleteAlredy i checked above code is working fine but my req is getting SOAP response instead of http responseis it's possible ,in case its possible plz send me sample code plz
Delete
ReplyDeleteHai Author, Very Good informative blog post,
Thanks
It is very useful information about salesforce . This is the place for learner and glad to be here in this blog Thank you
ReplyDeletesalesforce Training in Hyderabad
salesforce course in Hyderabad
Enroll
I feel happy about and I love learning more about this topic...
ReplyDeleteBest Salesforce Training in Hyderabad
Salesforce Online Training in Hyderabad
salesforce training
ReplyDeletesalesforce online training
Oracle Financials Cloud training will provide an in-depth understanding of your applications, including Accounting Hub, General Ledger, Payables, Receivables, and Revenue Management, and teach you how to set up, administer and use your Financials Cloud applications.
ReplyDeleteThere are various categories of Oracle Financials Cloud training which is mentioned below:
Oracle Financials Cloud corporate training
Oracle Accounting Hub Cloud Training
Oracle General Ledger Cloud Training
Oracle Payables Cloud Training
Oracle Receivables and Collection Cloud Training
Oracle Revenue Management Cloud Training
Oracle Financial Reporting Cloud Training
Complete Customization of Oracle Financials Cloud training’s course content is possible for Individual students and for Corporate. Oracle Financials Cloud online training is available for individuals and for corporate we may arrange the classroom as well. For more information on Oracle Financials Cloud, training does connect us.
Email: contact@maxmunus.com
Call / WhatsApp: +919035888988
yeezy shoes
ReplyDeletegolden goose
paul george shoes
supreme shirt
yeezy boost 500
yeezy
golden goose
supreme new york
yeezy boost 350 v2
yeezy