Salesforce SOQL sets batch download in REST api

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

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

+4
source share
1 answer

You can set the size of the REST batch using the option headers:

Field name

Sforce-Query Options

Field values

batchSize is a numeric value that determines the number of records returned for the query request. Objects for children are calculated by the number of entries for the batch size. For example, in relationship queries, multiple children can be returned to the parent string. The default value is 2000; minimum 200 and maximum 2000. There is no guarantee that the required lot size will be the actual lot size; This is done to maximize performance.

Example

Sforce-Query-Options: batchSize = 1000

Docs: http://www.salesforce.com/us/developer/docs/api_rest/Content/headers_queryoptions.htm

+1
source

Source: https://habr.com/ru/post/1499457/


All Articles