When I hit the sugarcrm rest end point the default offset is 20. how do I increase that?
I tried changing the default value for the list view other than 20 but it doesn't do the trick.
If you look at http://<your sugarcrm url>/rest/v10/help in your browser you will see that GET/<module> has a parameter max_num and the default is 20
Add max_num to your parameters to increase the limit, as far as I can tell, using -1 will get ALL results.
Have you ever pulled down a million records via REST API without ever timing out?
I am investigating an issue where the API call was ended abruptly after successfully pulling 20K - 50K records.
I have check all mysql global variables pertaining to timeout, php settings among other things but still not successful.
your help is greatly appreciated.
sorry, I have not tried anything like that.
Are you trying to pull a 20k records in a single REST API request? Or are you paginating across the request and the session times out? If you are paginating, then you ought to be able to pick up where you left off if you get logged out.
The query was to return accounts that was modified since last year. and the result was 1 million but now I think it was 700 thousands accounts. the max_num was not specified so it returns 20 records at a time. so yes it is doing pagination across the request.
however after retrieving 20 K up to 70 K records it would timeout. and the timeout time also varies, this query could go on for 6 hours straight or it could fail after 2 hours.
I have checked all the global variables in mysql pertaining to timeout I don't see anything that is close to that. the issue being sporadic also suggest that the problem is not with the timeout variables.
We thought about the access token got expired but I can see in the access_log that it renews the access token so that's that.
the key is it timeout not always at the exact time.
what else should I be looking for?
Can you help me in this How can I get all records of contact using REST API v10 ?
See Angel's answer to this thread:
How can I get all records of contact using REST API v10 ?
Retrieving data ...