Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
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)
edited by

Set the REST batch size using the following option headers:

Field name

Sforce-Query-Options

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.

Example

Sforce-Query-Options: batchSize=1000

Want to learn Salesforce in depth? Go through the Salesforce Training provided by Intellipaat!

Related questions

0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...