Newer Version Available
Composite Request Body
Composite Collection Input
- Properties
-
Name Type Description Required or Optional allOrNone Boolean Specifies what to do when an error occurs while processing a subrequest. If the value is true, the entire composite request is rolled back.
If the value is false, the remaining subrequests that don’t depend on the failed subrequest are executed. Dependent subrequests aren’t executed.
In either case, the top-level request returns HTTP 200 and includes responses for each subrequest.
Optional compositeRequest Composite Subrequest[] Collection of subrequests to execute. Required - JSON example
-
Composite Subrequest
- Properties
-
Name Type Description Required or Optional body The type depends on the request specified in the url property. The input body for the subrequest. Optional httpHeaders Map<String, String> Request headers and their values to include with the subrequest. You can include any header supported by the requested resource, except for the following headers because the subrequests inherit their values from the top-level request. - Accept
- Authorization
- Content-Type
Optional method String The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case sensitive). For a list of valid methods, see the documentation for the requested resource. Required referenceId String Reference ID that maps to the subrequest’s response and can be used to reference the response in later subrequests. You can include the referenceId in either the body or URL of a subrequest. Use this syntax to include a reference: @{referenceId.FieldName}.
The referenceId is case sensitive.
You can use two operators with the reference ID.
The . operator references a field on a JSON object in the response. The [] operator indexes a JSON collection in the response. You can use each operator recursively as long as it makes sense in the context of the response.
Required url String The resource to request. - The URL can include any query string parameters that the subrequest supports. The query string must be URL-encoded.
- The URL must start with /services/data/vXX.X/tooling.
- You can use parameters to filter response bodies.
Required
Usage
Because referenceId is case sensitive, make sure that the case of the field that you’re referring to is correct. The same field can use different cases in different contexts.