Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Composite Batch
The requests in a batch are called subrequests. All subrequests are executed in the context of the same user. Subrequests are independent, and you can’t pass information between them. Subrequests execute serially in their order in the request body. When a subrequest executes successfully, it commits its data. Commits are reflected in the output of later subrequests. If a subrequest fails, commits made by previous subrequests aren’t rolled back. If a batch request doesn’t complete within 10 minutes, the batch times out and the remaining subrequests aren’t executed.
- Limits—/services/data/vXX.X/limits
- sObject resources (except sObject Blob Retrieve and sObject Rich Text Image Retrieve)—/services/data/vXX.X/sobjects/
- Query—/services/data/vXX.X/query/?q=soql
- QueryAll—/services/data/vXX.X/queryAll/?q=soql
- Search—/services/data/vXX.X/search/?q=sosl
- Connect resources—/services/data/vXX.X/connect/
- Chatter resources—/services/data/vXX.X/chatter/
- Actions—vXX.X/actions
The API version of the resource accessed in each subrequest must be no earlier than 34.0 and no later than the Batch version in the top-level request. For example, if you post a Batch request to /services/data/v35.0/composite/batch, you can include subrequests that access version 34.0 or 35.0 resources. But if you post a Batch request to /services/data/v34.0/composite/batch, you can only include subrequests that access version 34.0 resources.
Syntax
URI: /services/data/vXX.X/composite/batch
Formats: JSON, XML
HTTP method: POST
Authentication: Authorization: Bearer token
Parameters: None required
Request body: Batch Request Body
Response body: Batch Response Body
Example
For an example of using the Composite Batch resource, see Update a Record and Get Its Field Values in a Single Request.