Michael O Klett
posted this on September 02, 2011 02:30 pm
To protect the integrity of our API and give a more consistent response time, we would like to impose a max "per_page" size of 200 records on all API endpoints. 200 is the current default, but we allow you to specify any page size you want. Larger sizes impact the performance of the database, but also create a larger response which put a strain on memory and CPU.
Our target for this change is Friday, September 9th, just before midnight EDT. Please let us know any concerns you have before then.
Over the next few months, we will be rolling out features that allow other efficient ways of exporting your data. Today, we have improved the performance of large CSV exports for subscriptions and transactions. Soon, we will offer filtered exports and other export tools.
Comments
Will I still be able to export all of my transactions to a CSV file?
Do all affected APIs support sorting?
-Anthony
Yes, exports to CSV will definitely continue to be supported.
We're actually making some changes now to ensure that efficient sorting is available for all APIs. I've decided to do this before we make the page_size change.
How can I retrieve more than 200 records with the chargify_api_ares gem? I tried Chargify::Subscription.find(:all, :per_page => 400) but I still only get 200 records back.
Vid,
You'll need to nest your per_page param beneath the "params" key, like
Chargify::Subscription.find(:all, :params => {:per_page => 400})
But, this is exactly what we're going to be changing - we're planning to limit your 400 to 200 (not actually deployed yet though).