Newer Version Available
Use Bulk Query
When adding a batch to a bulk query job,
the Content-Type in the header for the request must be either text/csv, application/xml, or application/json, depending on the content type specified when
the job was created. The actual SOQL statement supplied for the batch is in plain text format.
- URI
- https://instance_name—api.salesforce.com/services/async/APIversion/job/jobid/batch
- Bulk Query Request
-
Requests, and Responses
The following are example Bulk Query requests and responses.
- Create Bulk Query Batch HTTP Request
-
- Create Bulk Query Batch HTTP Response Body
-
- Get Batch Information for All Batches in a Job HTTP Request (used when PK chunking is enabled)
-
- Get Batch Information for All Batches in a Job HTTP Response Body
-
- Get Batch Results HTTP Request
-
- Get Batch Results HTTP Response Body
-
- Get Bulk Query Results HTTP Request
-
- Get Bulk Query Results HTTP Response Body
-
Java Example Using WSC
The following example logs in to an organization using the Partner API, then instantiates a BulkConnection object using the service endpoint from the Partner API login.