Some way to know about an API Key calls count?

Answered

Comments

14 comments

  • Andreas Haugstrup Pedersen

    Hi Eduardo,

    We don't have anything in place currently, we'll look into whether this is feasible and get back to you.

    /Andreas

    0
    Comment actions Permalink
  • Thank you Andreas, although this isn't indispensable, I think it would be most useful to fine-tune and to debug apps.

     

    I hope to hear soon about it,

    Best regards.

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    We will work something out for you. I'll let you know when it's done. :)

    0
    Comment actions Permalink
  • Bruno Soares Lima

    Thank you again Andreas, count me in for any tests you guys may want done.

    0
    Comment actions Permalink
  • Ops, me and Bruno are co-workers here and I used his pc - some browser cahce issue I think. Anyways, consider my comment above =)

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi again,

    We actually got the rate limits exposed yesterday, but I have been sick and forgot to let you know. You can read a bit here: https://developers.podio.com/index/limits 

    If you happen to be using the PHP client, pull the latest version and the rate limit info is exposed as:

    Podio::rate_limit();

    Podio::rate_limit_remaining();

    These are based off the HTTP response headers so they will vary depending on the exact call you make. I.e. you can use them to see exactly how many more times you can make that same call again. 

    1
    Comment actions Permalink
  • Bruno Soares Lima

    Thank you very much Andreas, and I hope you're feeling better.

     

    Very nice implemented, I was wondering how you guys woud come up with it because if it was some REST resource it would fall into some weird situation where you have to use a call to count calls etc, I guess you guys know more than anyone about it heh.

     

    There's this note "You cannot currently see when your rate limit counter is reset." and that's ok, not much worried about it yet but, can you tell me if all API keys reset at the same time or that depends on its creation time? And if it does, it can vary someway after one's reset timer has started or do you think I could, like, try to "guess" statistically each one's resets and take that as a reliable reference? (Sorry if I didn't make myself clear enough, I can come up with examples if needed).

    0
    Comment actions Permalink
  • (Ok I guess my browser won't forget Bruno's credentials ever '-_- sorry about that again, it was me Eduardo, above)

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    The reset time is actually a bit tricky for us to expose, but we thought it would be better to expose what we could rather than have you wait forever for us to deliver something perfect. :)

    The reset time is dependent on the first call you make. You could make qualified guesses based on that or you could use the count and just back off for 10 minutes whenever you hit the limit.

    PS. To properly log out of the help center on a shared computer use the logout link in the help center and not the one inside Podio. this will log you out everywhere. :)

    0
    Comment actions Permalink
  • Tricky indeed, but it's good enough. Thank you Andreas for all your help, really great and useful - it'll help a lot in our project.

    0
    Comment actions Permalink
  • Steve Shepherd 100Rails

    Is there anyway to request a higher rate limit. I am building an install able piece of software for pcs and macs that backsup a workspace. If I use up the limit does my software have to wait for an hour to continue?

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi Steve,

    You can read about rate limits and how to request increases at https://developers.podio.com/index/limits

    /Andreas

    0
    Comment actions Permalink
  • Matt Anderson

    Hey Andreas - any plans to add this to the ruby client?  Or, could you give me some ruby-fu to help with accessing the response headers?

    Thanks

    Matt

    0
    Comment actions Permalink
  • Matt Anderson

    never mind - i figured it out.

    Here's the ruby-fu:

    Podio.connection.get('/org/').env[:response_headers]["x-rate-limit-remaining"]

    This gets all orgs (the easiest api call), and pulls out the rate limit remaining from the response headers.

    Since this is a non-rate limited call, it will give you a number from 0-5000

    If you were to replace ('/org') with a rate-limited call, it will give you 0-250

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk