Create a connected Application in Salesforce
'Setup -> Apps -> Connected Apps'
Download curl here for (windows and mac)
(1) Curl API Authentication Template - for Salesforce API Authentication
I'll use this authentication and data-access curl template for two of the popular salesforce application programming interfaces, Salesforce Analytics API and Salesforce Tooling API
How to get started with Salesforce Analytics API ?
Jump in here on documents for Salesforce Analytics API (using REST) and have a look how you can pull the report metadata by providing the report Id. I created a matrix report on Opportunity and I'll use the report ID to pull metadata of this report. Remember the response would be in the JSON format.
Reading docs, it clearly says you can pull data for this matrix report by requesting Salesforce analytics
Api in the url format shown here
This GET request, /services/data/v29.0/analytics/reports/00OD0000001ZbP7MAK/describe, to the Describe resource returns metadata for a matrix report. This includes a bucket field, groupings, summaries, and a custom summary formula.
(2) Curl Data Access Template - for accessing data from Analytics API
Bingo - you get the JSON body response, you are ready to rock now
Copy paste and go to JSON beautifier to beautify the response from this junk this format to beautiful looking JSON response like here
Brilliant, we did it !! Now let us create new connected application to pull data from Salesforce Tooling API. Now, I am going to pull the 'list of all sobjects' but with tooling api.
How to get started with Salesforce Tooling API ?
Lists the available Tooling API objects and their metadata.
Brilliant, using the 'Template (1)' as shown above, I replaced my credentials again I replaced both consumer key and client secret' by creating a brand new connected application from scratch
Lets Authenticate using Login Template
Now once you get API token, lets query Tooling API by through this url
Sooner, I'll share the sample application I built on top of Salesforce that uses salesforce and remote objects to pull data plugging into API you needed. I hope this template will helpful for you in playing and spreading Salesforce API love all over world and among the community.
Sharing is Caring