Post

4 followers Follow
1
Avatar

Some way to know about an API Key calls count?

Here in our company we're trying to optimize and measure the calls to Podio, not only to make them more efficient for both parts but sometimes for debugging purposes too.

 

Is there any way to know the calls count for each API Key at the moment? If not, could it be done (something Rest-callable i.e.)?

 

Thank you.

Eduardo Vaz de Mello Andrade Nazareth Answered

Please sign in to leave a comment.

14 comments

0
Avatar

Hi Eduardo,

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

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

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.

Eduardo Vaz de Mello Andrade Nazareth 0 votes
0
Avatar

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

Andreas Haugstrup Pedersen 0 votes
0
Avatar

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

Bruno Soares Lima 0 votes
0
Avatar

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

Eduardo Vaz de Mello Andrade Nazareth 0 votes
1
Avatar

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. 

Andreas Haugstrup Pedersen 1 vote
0
Avatar

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

Bruno Soares Lima 0 votes
0
Avatar

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

Eduardo Vaz de Mello Andrade Nazareth 0 votes
0
Avatar

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

Andreas Haugstrup Pedersen 0 votes
0
Avatar

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.

Eduardo Vaz de Mello Andrade Nazareth 0 votes
0
Avatar

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?

Steve Shepherd 100Rails 0 votes
0
Avatar

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

Matt Anderson 0 votes
0
Avatar

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

Matt Anderson 0 votes