If you always wanted to learn salesforce.com APIs and what you could do with them, but too afraid to ask.. fear not - now that we have example API collection directly from salesforce!
Ok.. not so exciting as Salesforce Functions - I get it. But it is interesting to see the additional effort to make it a tad easier for developers.
Here’s how you get invoking Salesforce APIs in no time -
- Download Postman. Sign up through the app or at postman.com
- Go to Postman Salesforce API collection
- Click on
...button against collection and fork it for your own use
You should now be able to see the API collection in your own workspace.
Now, click on the
... against the collection and click on
Edit. You should be able to provide the access token on
Authorization tab. Alternatively, click on
Get New Access Token button to create and select
Use Token to populate a new access token.
Variables tab in the same settings and populate
_endPoint value to your org URL. For e.g. my developer edition is at
Save to save changes.
You can now start invoking APIs like there’s no tomorrow.
Explore the collection of APIs to understand how you can consume / invoke Salesforce APIs and integrate your own applications.
What if I am not using Postman?
Click on the same
... against your collection. Export collection to a JSON.
Go to your favourite REST client and import the Postman collection. (If your favourite REST client is cURL, you would have probably written some script and clicking away at hotkeys to invoke the APIs).
For e.g. I can do this in Insomnia.
- Click on your workspace >
- Click on
- Select the JSON file exported from Postman
- Right-click on API collection folder > choose
- Provide values for
- Go to
Bearer Token> Provide
_accessToken(yes, there should be a better way to specify this environment variables for all APIs at once)
Start invoking the API.. like there’s no tomorrow.