Query in Bulk API 2.0

Bulk API 2.0 now supports bulk query jobs. These jobs enable asynchronous processing of SOQL queries and are designed to handle queries that return large amounts of data (10,000 records or more).

Why: Bulk queries are also available in Bulk API (that is, the /services/async/ endpoint introduced in version 16 of the Lightning Platform API). But the Bulk API 2.0 implementation has several advantages:

  • It does not require you to handle batches. All results are returned in one set.
  • Limits have been simplified and are available to clients via a /limits endpoint.
  • This implementation is better integrated with other Salesforce REST APIs:
    • It does not require a special X-SFDC-Session header.
    • It supports all the regular OAuth workflows.
    • Its design is more consistent with the other Salesforce APIs.