<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>REST API &#8211; Jitendra Zaa</title>
	<atom:link href="https://www.jitendrazaa.com/blog/tag/rest-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jitendrazaa.com/blog</link>
	<description>AI, Salesforce, ServiceNow &#38; Enterprise Tech Guides</description>
	<lastBuildDate>Mon, 12 Jun 2017 18:04:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">87744916</site><atom:link rel="search" type="application/opensearchdescription+xml" title="Search Jitendra Zaa" href="https://www.jitendrazaa.com/blog/wp-json/opensearch/1.1/document" />	<item>
		<title>using cURL with Salesforce Rest API</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-curl-with-salesforce-rest-api/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/using-curl-with-salesforce-rest-api/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Thu, 16 Jul 2015 01:15:47 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[REST API]]></category>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=4709</guid>

					<description><![CDATA[Workbench is one of widely used tool in Salesforce when it comes to exploring REST API of Salesforce. However I wanted to export REST API response in Binary format and therefore used cURL. cURL is open source command line library mostly used to test http request. It can be downloaded from here and official documentation about how to use [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><a href="https://workbench.developerforce.com/">Workbench </a>is one of widely used tool in Salesforce when it comes to exploring REST API of Salesforce. However I wanted to export REST API response in Binary format and therefore used cURL. <a href="http://curl.haxx.se/">cURL </a>is open source command line library mostly used to test http request. It can be downloaded from <a href="http://curl.haxx.se/download.html">here</a> and official documentation about <a href="http://curl.haxx.se/docs/httpscripting.html">how to use cURL can be referred from here</a>.</p>
<p style="text-align: justify;">To use cURL with Salesforce REST API, we will need to use <a href="https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm">username &#8211; password flow of OAuth2</a>. To use OAuth2, we need to create connected App. You can check &#8220;Create Connected app&#8221; section of <a href="https://www.jitendrazaa.com/blog/salesforce/login-to-salesforce-from-salesforce-using-authentication-provider/">this post</a>. You can enter any URL for callback or if you have already created any connected app in past, then it can be used. After creating connected app, note &#8220;Consumer key&#8221; and &#8220;Consumer Secret&#8221; somewhere.</p>
<p style="text-align: justify;">create file &#8220;LoginInfo.txt&#8221; file which will have all required login information in URL encoded format</p>
<pre class="brush: java; title: ; notranslate">
grant_type=password&amp; client_id= 3MVG9iTxZANhwsdsdsdsdspr0Lu3QNRNKk4c2FejzTys5Mlp43UeSHBuhWWgRjEUyV6xE7N0GostjR3sRat &amp; client_secret=21961212323233121943 &amp; username=jitendra.zaa@demo.com &amp; password=myPWDAndSecurityToken
</pre>
<p style="text-align: justify;">make sure there is no space in above file. I have added some space for sake of readability.</p>
<p style="text-align: justify;">grant_type=password informs Salesforce to use &#8220;Username and password&#8221; flow of OAuth2, We are also passing client_id, client_secret, username and password.<span id="more-4709"></span></p>
<p><strong>1. Login to Salsforce using cURL</strong></p>
<p>Run below command to login into Salesforce</p>
<pre class="brush: bash; title: ; notranslate">
curl -X POST -d @LoginInfo.txt https://login.salesforce.com/services/oauth2/token
</pre>
<p>Output :</p>
<pre class="brush: jscript; title: ; notranslate">
{&quot;id&quot;:&quot;https://login.salesforce.com/id/00D90000000YnViEAK/00590000000Gl5VAAS&quot;, &quot;issued_at&quot;:&quot;1437005678627&quot;, &quot;token_type&quot;:&quot;Bearer&quot;, &quot;instance_url&quot;:&quot;https://shivasoftdemo-dev-ed.my.salesforce.com&quot;, &quot;signature&quot;:&quot;RlUOj40dyd0bhSZPNIKqE7Jp7DpyXSKULEFaYolW/3I=&quot;, &quot;access_token&quot;:&quot;00D90000000YnVi!ARIAQB0fu5fjPy_ JClQ7B343ffdfRcPv0toe7QcotaZu1aWJnVmN2enCLAeUKBQVcnSvR3JjDz20 2LfRpGTRzaCdsds6lUBnaQ&quot;}
</pre>
<p>Above output returned in JSON format is not readable so we can add header &#8220;PrettyPrint&#8221; in REST API request to return formatted json response.</p>
<p><strong>2. Login to Salsforce using cURL with PrettyPrint option</strong></p>
<p>new request will look like :</p>
<pre class="brush: bash; title: ; notranslate">
curl -X POST -d @LoginInfo.txt https://login.salesforce.com/services/oauth2/token -H &quot;X-PrettyPrint:1&quot;
</pre>
<p>Output :</p>
<pre class="brush: jscript; title: ; notranslate">
{
  &quot;id&quot; : &quot;https://login.salesforce.com/id/00D90000000YnViEAK/005900df000Gl5VAAS&quot;,
  &quot;issued_at&quot; : &quot;1437005809464&quot;,
  &quot;token_type&quot; : &quot;Bearer&quot;,
  &quot;instance_url&quot; : &quot;https://shivasoftdemo-dev-ed.my.salesforce.com&quot;,
  &quot;signature&quot; : &quot;3PD9nGTtpis23aWNP8IPtL3sYNuApFdfdd8eDa2Rc=&quot;,
  &quot;access_token&quot; : &quot;00D90000000YnVi!ARIAQB0fu5fjPy_JClQ7BrkkyX3RcPvdfdaWJnVmN 2enCLAeUKBQVcnSvR3JjDz202LfRpGTRzaCmsC6lUBnaQ&quot;
}
</pre>
<p>If login is success then we will get response as shown above. Extract &#8220;access_token&#8221; and &#8220;instance_url&#8221; from above response, as it will be used on every subsequent API calls.</p>
<p>As we received session id in form of &#8220;access_token&#8221;, we can use cURL exactly like workbench as shown in below example.</p>
<p><strong>3. Example &#8211; Get information about all available REST API in Salesforce</strong></p>
<pre class="brush: bash; title: ; notranslate">
curl -H &quot;Authorization: Bearer 00D90000000YnVi!ARIAQBdfu5fjPy_JClQ7BrkkyX3RcPv0toe 7QcotaZu1aWJnVmN2enCLAeUKBQVcnSvR3JjDz202LfRpGTRzaCmsC6lUBnaQ&quot; -H &quot;X-PrettyPrint:1&quot; https://shivasoftdemo-dev-ed.my.salesforce.com/services/data/v34.0/
</pre>
<p>Don&#8217;t forget to include Bearer attribute in double quotes as session id contains exclamation mark and it creates issue while sending request.</p>
<p>Output :</p>
<pre class="brush: jscript; title: ; notranslate">
{
  &quot;limits&quot; : &quot;/services/data/v34.0/limits&quot;,
  &quot;sobjects&quot; : &quot;/services/data/v34.0/sobjects&quot;,
  &quot;support&quot; : &quot;/services/data/v34.0/support&quot;,
  &quot;connect&quot; : &quot;/services/data/v34.0/connect&quot;,
  &quot;query&quot; : &quot;/services/data/v34.0/query&quot;,
  &quot;theme&quot; : &quot;/services/data/v34.0/theme&quot;,
  &quot;queryAll&quot; : &quot;/services/data/v34.0/queryAll&quot;,
  &quot;nouns&quot; : &quot;/services/data/v34.0/nouns&quot;,
  &quot;knowledgeManagement&quot; : &quot;/services/data/v34.0/knowledgeManagement&quot;,
  &quot;tooling&quot; : &quot;/services/data/v34.0/tooling&quot;,
  &quot;chatter&quot; : &quot;/services/data/v34.0/chatter&quot;,
  &quot;analytics&quot; : &quot;/services/data/v34.0/analytics&quot;,
  &quot;recent&quot; : &quot;/services/data/v34.0/recent&quot;,
  &quot;composite&quot; : &quot;/services/data/v34.0/composite&quot;,
  &quot;process&quot; : &quot;/services/data/v34.0/process&quot;,
  &quot;licensing&quot; : &quot;/services/data/v34.0/licensing&quot;,
  &quot;identity&quot; : &quot;https://login.salesforce.com/id/00D90000000YnViEAK/00590000000Gl5VAAS&quot;,
  &quot;flexiPage&quot; : &quot;/services/data/v34.0/flexiPage&quot;,
  &quot;search&quot; : &quot;/services/data/v34.0/search&quot;,
  &quot;quickActions&quot; : &quot;/services/data/v34.0/quickActions&quot;,
  &quot;wave&quot; : &quot;/services/data/v34.0/wave&quot;,
  &quot;appMenu&quot; : &quot;/services/data/v34.0/appMenu&quot;,
  &quot;compactLayouts&quot; : &quot;/services/data/v34.0/compactLayouts&quot;,
  &quot;actions&quot; : &quot;/services/data/v34.0/actions&quot;,
  &quot;tabs&quot; : &quot;/services/data/v34.0/tabs&quot;
}
</pre>
<figure id="attachment_4715" aria-describedby="caption-attachment-4715" style="width: 600px" class="wp-caption aligncenter"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Using-cURL-with-Salesforce-REST-API.png?ssl=1"><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="wp-image-4715" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Using-cURL-with-Salesforce-REST-API.png?resize=600%2C522&#038;ssl=1" alt="Using cURL with Salesforce REST API" width="600" height="522" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Using-cURL-with-Salesforce-REST-API.png?w=843&amp;ssl=1 843w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Using-cURL-with-Salesforce-REST-API.png?resize=300%2C261&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Using-cURL-with-Salesforce-REST-API.png?resize=624%2C543&amp;ssl=1 624w" sizes="(max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-4715" class="wp-caption-text">Using cURL with Salesforce REST API</figcaption></figure>
<p><strong>Making Salesforce REST API request without SessionId</strong></p>
<p>Curl works like browser, If we try to access REST API directly from browser then we get below error</p>
<figure id="attachment_4781" aria-describedby="caption-attachment-4781" style="width: 824px" class="wp-caption aligncenter"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId.png?ssl=1"><img data-recalc-dims="1" decoding="async" class="size-full wp-image-4781" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId.png?resize=824%2C248&#038;ssl=1" alt="Salesforce REST API without SessionId" width="824" height="248" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId.png?w=824&amp;ssl=1 824w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId.png?resize=300%2C90&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId.png?resize=624%2C188&amp;ssl=1 624w" sizes="(max-width: 824px) 100vw, 824px" /></a><figcaption id="caption-attachment-4781" class="wp-caption-text">Salesforce REST API without SessionId</figcaption></figure>
<p>If we try to do same with cURL then we will get same error:</p>
<figure id="attachment_4782" aria-describedby="caption-attachment-4782" style="width: 989px" class="wp-caption aligncenter"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId-Using-Curl.png?ssl=1"><img data-recalc-dims="1" decoding="async" class="size-full wp-image-4782" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId-Using-Curl.png?resize=989%2C222&#038;ssl=1" alt="Salesforce REST API without SessionId Using Curl" width="989" height="222" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId-Using-Curl.png?w=989&amp;ssl=1 989w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId-Using-Curl.png?resize=300%2C67&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-REST-API-without-SessionId-Using-Curl.png?resize=624%2C140&amp;ssl=1 624w" sizes="(max-width: 989px) 100vw, 989px" /></a><figcaption id="caption-attachment-4782" class="wp-caption-text">Salesforce REST API without SessionId Using Curl</figcaption></figure>
<p><strong>Try to access Visualforce page using cURL</strong></p>
<p>To access Visualforce page in Salesforce, first we need to login to Salesforce. Once logged in, if we try to access Visualforce page even with valid session Id, we will not get proper output because of Salesforce security , it shows that it is checking for sfdc.app and navigator and tries to redirect to Login page.  It does not display expected output from Visualforce. It clearly seems that salesforce is using some sort of security to check valid request.</p>
<figure id="attachment_4786" aria-describedby="caption-attachment-4786" style="width: 967px" class="wp-caption alignleft"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-visualforce-security-check-using-cURL.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-4786" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-visualforce-security-check-using-cURL.png?resize=967%2C905&#038;ssl=1" alt="Salesforce visualforce security check using cURL" width="967" height="905" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-visualforce-security-check-using-cURL.png?w=967&amp;ssl=1 967w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-visualforce-security-check-using-cURL.png?resize=300%2C281&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Salesforce-visualforce-security-check-using-cURL.png?resize=624%2C584&amp;ssl=1 624w" sizes="auto, (max-width: 967px) 100vw, 967px" /></a><figcaption id="caption-attachment-4786" class="wp-caption-text">Salesforce visualforce security check using cURL</figcaption></figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In same way, if we are logged in to curl previously and then try to access Visualforce using post method then salesforce tries to display form element with request forwarded from cURL. It does not display expected output from Visualforce. We can clearly see that how secure is salesforce and there is no way to break it.</p>
<figure id="attachment_4783" aria-describedby="caption-attachment-4783" style="width: 989px" class="wp-caption alignleft"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Access-Visualforce-page-using-cURL.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-4783" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Access-Visualforce-page-using-cURL.png?resize=989%2C449&#038;ssl=1" alt="Access Visualforce page using cURL" width="989" height="449" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Access-Visualforce-page-using-cURL.png?w=989&amp;ssl=1 989w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Access-Visualforce-page-using-cURL.png?resize=300%2C136&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/07/Access-Visualforce-page-using-cURL.png?resize=624%2C283&amp;ssl=1 624w" sizes="auto, (max-width: 989px) 100vw, 989px" /></a><figcaption id="caption-attachment-4783" class="wp-caption-text">Access Visualforce page using cURL</figcaption></figure>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/using-curl-with-salesforce-rest-api/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4709</post-id>	</item>
		<item>
		<title>Call Salesforce REST API from Apex</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/call-salesforce-rest-api-from-apex/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/call-salesforce-rest-api-from-apex/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Thu, 27 Feb 2014 17:58:25 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[REST API]]></category>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=6152</guid>

					<description><![CDATA[Use Apex to call Salesforce REST API with sample source code]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">In <a href="https://www.jitendrazaa.com/blog/salesforce/salesforce-rest-api-playground/">previous </a>post, we saw that how Visualforce can be used to call <strong>Salesforce Rest API. </strong>In this short post, I would share a small piece of code to demonstrate <strong>how to use Apex to call Salesforce REST API.</strong></p>
<p style="text-align: justify;">First and foremost step is to add your Salesforce instance URL in <strong>Remote site settings. </strong>Once that is done, use below sample Apex code to call Salesforce REST API.</p>
<p style="text-align: justify;">I am using API to get metadata information about Salesforce object however that can be replaced by any supported REST API of Salesforce.<span id="more-6152"></span></p>
<pre class="brush: java; title: ; notranslate">
//Make sure your Salesforce instance URL is added in remote site settings
String sfdcURL = URL.getSalesforceBaseUrl().toExternalForm(); 
String restAPIURL = sfdcURL + '/services/data/v29.0/sobjects/';  
  
HttpRequest httpRequest = new HttpRequest();  
httpRequest.setMethod('GET');   
httpRequest.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionId());        
httpRequest.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID()); 
httpRequest.setEndpoint(restAPIURL);  
String response = '';
try {  
		 Http http = new Http();   
		 HttpResponse httpResponse = http.send(httpRequest);  
		 if (httpResponse.getStatusCode() == 200 ) {  
			   response = JSON.serializePretty( JSON.deserializeUntyped(httpResponse.getBody()) );  
		 } else {  
			   System.debug(' httpResponse ' + httpResponse.getBody() );  
			   throw new CalloutException( httpResponse.getBody() );  
		 }   
} catch( System.Exception e) {  
		 System.debug('ERROR: '+ e);  
		 throw e;  
}  
System.debug(' ** response ** : ' + response );  
</pre>
<p style="text-align: justify;">Key aspect in above code is how session Id is used as a value in <strong>OAuth</strong> and <strong>Bearer</strong> headers.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/call-salesforce-rest-api-from-apex/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6152</post-id>	</item>
		<item>
		<title>Salesforce REST API Playground</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/salesforce-rest-api-playground/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/salesforce-rest-api-playground/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra Zaa]]></dc:creator>
		<pubDate>Tue, 25 Feb 2014 03:55:21 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[Visualforce]]></category>
		<guid isPermaLink="false">http://JitendraZaa.com/blog/?p=3762</guid>

					<description><![CDATA[What is REST API ? In my words, Getting data from Other System or Same System using HTTP request is known as REST API. If you know, how website works, you know REST API. Before REST API, there was SOAP request which needed lots of configuration and very tightly coupled. If you make any modification [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>What is REST API ?</strong></p>
<blockquote><p>In my words, Getting data from Other System or Same System using HTTP request is known as REST API.</p></blockquote>
<p style="text-align: justify;">If you know, how website works, you know REST API. Before REST API, there was <a title="SOAP API" href="https://jitendrazaa.com/blog/java/create-soap-message-using-java/">SOAP </a>request which needed lots of configuration and very tightly coupled. If you make any modification , you had to modify client side also by generating stubs / proxy classes again. There were many more disadvantages which got address by REST API. However, it doesn&#8217;t mean we don&#8217;t need SOAP.</p>
<p style="text-align: justify;">Back to REST API, It is very simple to setup and almost any programming language can make HTTP request so very easy to get data from other source. Return type of REST API can be XML, Simple HTTP, <a title="Why should I use JSON over XML ?" href="https://jitendrazaa.com/blog/salesforce/why-should-i-use-json-over-xml/">JSON </a>or any media like image. However, <a title="Why should I use JSON over XML ?" href="https://jitendrazaa.com/blog/salesforce/why-should-i-use-json-over-xml/">JSON </a>is very popular response type amongst all.</p>
<p>In Past, I have already written one article <a title="Getting record from other Salesforce organization OR communication between multiple salesforce organization" href="https://jitendrazaa.com/blog/salesforce/getting-record-from-one-salesforce-organization-to-other/">demonstrating REST API usage</a>.</p>
<p><strong>How to use Salesforce REST API using <a title="JQuery Tutorials" href="https://jitendrazaa.com/blog/tag/jquery/">JQuery </a>in <a title="Visualforce" href="https://jitendrazaa.com/blog/tag/visualforce/">Visualforce </a>?</strong></p>
<p style="text-align: justify;"><span style="text-decoration: underline;"><strong>REST API Playground</strong></span> : I have created Simple Visualforce page, which demonstrates how to use REST API of Salesforce. It is written in Visualforce with the help of JQuery. You can study this code and play with it in your organization, you just need to copy and paste it.</p>
<p style="text-align: justify;">You also need to add URL &#8220;http://cdnjs.cloudflare.com&#8221; in <em>Remote Site Settings,</em> so that salesforce will allow Visualforce page to get JQuery library from CDN.</p>
<p><span id="more-3762"></span></p>
<p><strong>Video Demo :</strong><br />
<iframe loading="lazy" src="//www.youtube.com/embed/zSaSu-JRXWc" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<figure id="attachment_3767" aria-describedby="caption-attachment-3767" style="width: 625px" class="wp-caption alignnone"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-large wp-image-3767" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?resize=625%2C220&#038;ssl=1" alt="REST API playground in Salesforce" width="625" height="220" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?resize=1024%2C362&amp;ssl=1 1024w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?resize=300%2C106&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?resize=624%2C220&amp;ssl=1 624w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2014/02/REST-API-playground-in-Salesforce.png?w=1321&amp;ssl=1 1321w" sizes="auto, (max-width: 625px) 100vw, 625px" /></a><figcaption id="caption-attachment-3767" class="wp-caption-text">REST API playground in Salesforce</figcaption></figure>
<p><strong>Complete Visualforce page :</strong></p>
<p><script src="https://gist.github.com/JitendraZaa/b9d8d23123b6153f4576.js"></script></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/salesforce-rest-api-playground/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3762</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.jitendrazaa.com @ 2026-06-19 09:01:31 by W3 Total Cache
-->