Our documentation has moved!

You are currently viewing a legacy version of our help articles.
For the most up-to-date version, please use the new Chargify Help & Support Site.
Follow

[2011-09-02] API Change: Max page size set to 200 records

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.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

6 Comments

  • 0
    Avatar
    Anthony Eden

    Will I still be able to export all of my transactions to a CSV file?

    Do all affected APIs support sorting?

    -Anthony

  • 0
    Avatar
    Michael Klett

    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.

  • 0
    Avatar
    Vid Luther

    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.

  • 0
    Avatar
    Michael Klett

    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).

  • 0
    Avatar
    Michael Birk

    I know this change occurred a while ago, but I do wish that you had raised an error in the case where a per_page > 200 was requested.  In general, silently modifying the request is not ideal.  We missed the change announcement (my bad, I know) and had to re-download all Chargify transactions and re-submit revenue reports for several months after we fixed our bug.  It's all fixed now, but something to keep in mind for your next API change.

  • 0
    Avatar
    Michael Klett

    Good point, Michael, and thanks for the input.  For future changes like this (hopefully there won't be any!) we'll return an error for "illegal" paramters.

Please sign in to leave a comment.
Powered by Zendesk