Explore Courses Blog Tutorials Interview Questions
0 votes
in Salesforce by (11.9k points)

Is there a way to set the batch size to 2000 (maximum)? I know it is possible via soap API by adding an option: see here

Is there a way to achieve this via REST API POST request?

1 Answer

0 votes
by (32.1k points)

Set the REST batch size using the following option headers:

Field name


Field values

batchSize — A numeric value that specifies the number of records returned for a query request. Child objects count toward the number of records for the batch size. For example, in relationship queries, multiple child objects may be returned per parent row returned. The default is 2,000; the minimum is 200, and the maximum is 2,000. There is no guarantee that the requested batch size will be the actual batch size; this is done to maximize performance.


Sforce-Query-Options: batchSize=1000

Related questions

0 votes
1 answer
0 votes
1 answer

Browse Categories