How to make Salesforce BULK API V1 Query request from PostMan?

How to make Salesforce BULK API V1 Query request from PostMan?

Using PostMan client, we can make Salesforce Bulk API V1 create job, create batch, check batch status, close job and check job status requests.

1. Create a Connected App in Salesforce.

Callback URL should be https://{Your Domain}.my.salesforce.com/services/oauth2/callback

Example:

https://test-ec-dev-ed.develop.my.salesforce.com/services/oauth2/callback

2. Get the Access token.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/oauth2/token

3. Use the Access Token from Step 2 and make a POST Request to create a Job.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/async/52.0/job/

Header:

Body:

<?xml version="1.0" encoding="UTF-8"?>
<jobInfo
    xmlns="http://www.force.com/2009/06/asyncapi/dataload">
  <operation>query</operation>
  <object>Account</object>
  <concurrencyMode>Parallel</concurrencyMode>
  <contentType>CSV</contentType>
</jobInfo>

4. Use the id from the create job request.

5. Create a batch request using the job id.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/async/52.0/job/7503t00000dJ1i9AAC/batch

Header:

Body:

6. Monitor the Job status in Salesforce setup.

7. Do a GET request to get the batch status.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/async/52.0/job/7503t00000dJ1i9AAC/batch

Header and Response:

8. Do a POST Request to close the Job.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/async/52.0/job/7503t00000dJ051AAC

Header:

Body:

{
   "state" : "Closed"
}

Response:

9. Do a GET request to confirm the status.

Endpoint URL:

https://test-ec-dev-ed.develop.my.salesforce.com/services/async/52.0/job/7503t00000dJ1i9AAC

Header and Response:

Leave a Reply