EXECUTE A SOQL QUERY IN POSTMAN.

E

INTRODUCTION: Process is to fetch data from salesforce object by executing SOQL query in postman.

1. Using SOQL query to retrieve data from SF object. In the below example we have to fetch data from the opp. object using a SOQL query in postman. Instead of writing code for fetching data we write a query in postman for the same.

2. The following query requests the value from StageName fields from all Opportunity records:

http://MyDomainName.my.salesforce.com/services/data/v54.0/query/q=SELECT+StageName,Name+FROM+Opportunity+WHERE+Id=%270065D000006hSIkQAM%27+LIMIT+1

NOTE: Pass the Bearer Token in Authorization else will give the error. No header. If we pass the header and security token in more than one place it will through a session error.

3. Below is the Screenshot of the postman session which shows the auth.

4. We get the response of the query in JSON format as below :

{
“done” : true,
“totalSize” : 3214,
“records” : […]
}

Conclusion: The Blog has shown you how to execute the SOQL query in postman using the GET method. Implementingthe above steps will make it easier for you to retrieve specific records based on your requirements.

About the author

Udayraj Patil
By Udayraj Patil

Category