Batch Request

Executes a batch of subrequests.

Returns a RestRequest object containing a batch of up to 25 subrequests specified in a list of RestRequest objects. Each subrequest counts against rate limits.

Parameters 

  • requests (array/list)
  • haltOnError (Boolean)
  • apiVersion (string)

iOS 

Swift

1RestClient.shared.batchRequest(requests:haltOnError:apiVersion:)
Objective-C

1- (SFRestRequest *) batchRequest:(NSArray<SFRestRequest *> *)requests
2                     haltOnError:(BOOL)haltOnError
3                      apiVersion:(nullable NSString *)apiVersion;

Android 

Java

1public static BatchRequest getBatchRequest(String apiVersion, boolean haltOnError, List<RestRequest> requests) throws JSONException

See Also 

We've Moved

Welcome to the new home of the Mobile SDK Developer Guide! For now, the Japanese guide can be found in PDF form.