Salesforce exposes a rich set of application program interfaces (APIs) that integrate with third-party systems. All of these APIs are thoroughly documented, but how can you quickly try them on a given org, or better yet, on multiple orgs? Postman helps you discover, explore, and test integration options with the Salesforce Platform APIs.
Salesforce provides programmatic access to your org's information through simple, powerful, and secure APIs. The APIs provided by Salesforce include REST, SOAP, Connect, User Interface, Analytics, Bulk, Metadata, and Streaming.
Postman is an application that you can use to configure and call HTTP-based APIs, such as REST or SOAP. You configure this powerful tool in an easy-to-use graphical user interface. It supports environment variables, team workspaces, and JavaScript automation.
Use Postman as a desktop app or in a web browser. In this project, you set up and use Postman in a web browser, because it doesn't require downloading and installing software.
The Salesforce Platform APIs for Postman collection is a resource that wraps together 200+ request templates for many Salesforce Platform APIs. This open source collection uses the configurable Postman environment and variables so that you can easily authenticate and try the requests on multiple Salesforce orgs.
For this project, you need to create a new Trailhead Playground. Scroll to the bottom of this page, click the playground name, then click Create Playground. It typically takes 3–4 minutes to create a new Trailhead Playground.
Let's get started by opening your Trailhead Playground. Scroll to the bottom of this page and click Launch. If you see a tab in your org labeled Get Your Login Credentials, great! Skip ahead to step 1. Otherwise, from the App Launcher, find and open Playground Starter and follow the steps.
Save your username and password for use later in this project.
Cross-Origin Resource Sharing (CORS) allows code running in a web browser to communicate with Salesforce from a specific origin. Let's add the URL patterns for Postman.
cors
in the Quick Find box and select CORS.https://_.postman.com
as the Origin URL Pattern.https://_.postman.co
(note the .co domain extension) as the Origin URL Pattern.Your playground is ready for you to connect Postman to it. You do that in the next step.
Postman has two options for working with its app: desktop and web. You use the web browser app for this project.
SalesforceCollection
.MySalesforceAPIFork
.You now have the collection ready in Postman. Let's use the collection to authorize your org and test it.
You need to authenticate with Salesforce to access the APIs. Authentication grants you an access token that's valid for a certain duration. Repeat this process whenever your access token expires.
instance_url
points to your Trailhead Playground.instance_url
to use in step 12. Be sure to copy only the URL with no extra characters.instance_url
value that you copied in step 9.Let's verify that the connection is working.
You've successfully authenticated with Salesforce. Now you can use other requests in the collection.
You just pulled some data from the org. Let's try adding some new data to the org.
Account
.{
"Name": "Postman",
"BillingState": "CA"
}
Excellent! You've set up Postman to interact with your org. The Salesforce APIs for Postman collection that you loaded will aid you in your quest to discover the Salesforce APIs.
This course was originally created by Salesforce and has been modified to suit the Quickstart format. Complete this lesson in Trailhead to collect your Salesforce learning badge.