Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Salesforce REST API Query More than 2000

I'm trying to execute a SOQL query using salesforce REST API which will return 2,749 results. However it seems there is a limit of 2,000 results that can be returned for a given request.

Is there a way to query the remaining 749 results without using the OFFSET keyword? (it's not currently supported in my production environment).

I looked into this and found a queryMore function but I can't find a way to call it through the REST API.

like image 848
driangle Avatar asked May 02 '12 18:05

driangle


People also ask

How do I show more than 2000 rows in Salesforce?

To view more rows, export the report to Excel or use the printable view for tabular and summary reports. For joined reports, printable view displays a maximum of 20,000 rows. Printable view is only available in Salesforce Classic.

How do I see REST API limits in Salesforce?

To better monitor your org's API usage and limits, you can use these resources: The API Usage section of the System Overview page in Setup. The API Requests, Last 24 Hours item in the Organization Detail section of the System Overview page in Setup.

What is the maximum batch size limit in queries?

A batch can contain a maximum of 10,000,000 characters for all the data in a batch. A field can contain a maximum of 32,000 characters.


1 Answers

part of the result is a nextRecordsUrl property which when you do a GET on it, will return you the next chunk of the results. See the section on query in the rest api docs.

like image 142
superfell Avatar answered Nov 15 '22 05:11

superfell