Newer Version Available

This content describes an older version of this product. View Latest

Get a Batch Request

Get a batch request by sending a GET request to the following URI. This is available in API version 19.0 and later.

Alternatively, you can get a batch request in Salesforce. To track the status of bulk data load jobs and their associated batches, from Setup, in the Quick Find box, enter Bulk Data Load Jobs, then select Bulk Data Load Jobs. Click the Job ID to view the job detail page. The job detail page includes a related list of all the batches for the job. The related list provides View Request and View Response links for each batch. If the batch is a CSV file, the links return the request or response in CSV format. If the batch is an XML or JSON file, the links return the request or response in XML or JSON format, respectively.

URI
/services/async/APIversion/job/jobid/batch/batchId/request
Example request body
No request body is allowed.
Example XML response body
1<?xml version="1.0" encoding="UTF-8"?>
2<sObjects xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3  <sObject>
4    <description>Created from Bulk API</description>
5    <name>[Bulk API] Account 0 (batch 0)</name>
6  </sObject>
7  <sObject>
8    <description>Created from Bulk API</description>
9    <name>[Bulk API] Account 1 (batch 0)</name>
10  </sObject>
11</sObjects>
Example JSON response body
1[
2   {
3      "Name" : "[Bulk API] Account 0 (batch 0)",
4      "description" : "Created from Bulk API"
5   },
6   {
7      "Name" : "[Bulk API] Account 1 (batch 0)",
8      "description" : "Created from Bulk API"
9   }
10]