REST API List View Results – 25 record limit?

I can’t seem to find this information anywhere, but it seems that Salesforce imposes a limit of 25 records to be returned from a list view results call to the REST API.

Does anyone know if this is at all configurable?
If not, what alternatives are there to be able to retrieve more than 25 records from a list view?

Answer

I believe the documentation is just not updated for the REST API. I took a cue from Daniel’s answer and tried to see what would happen if we pass the properties in the parameters of the rest query.. VOILA!!It worked and surprisingly it returned huge volume (max I have tried is 5k) of records too.

https://cs80.salesforce.com/services/data/v34.0/sobjects/Opportunity/listviews/‌​listViewId/results?limit=5000

You could also use offset to paginate the results (get the next 2000 records with the below query)

https://cs80.salesforce.com/services/data/v34.0/sobjects/Opportunity/listviews/‌​listViewId/results?limit=2000&offset=2000

UPDATE: My bad I checked it wrong. It returns a maximum of 2000 records irrespective of the limit value in the parameter

Attribution
Source : Link , Question Author : emroc , Answer Author : Sam

Leave a Comment