ForumsDevelopersAPI Excessive usage questions


API Excessive usage questions
Author Message
benny

Posted: Apr 16, 2009
Score: 0 Reference
I'm a recent Pro account holder and convert from another task webapp that will go nameless because I can't Remember it anymore...

I am playing with the API for some specific purposes. I have a need for two things that I have written against the other guys API - a summary report generator and a quick task add. The report generator accepts several parameters to allow me to specify a set of tasks - it's almost always used just once at the end of the week to generate a summary report of the tasks completed that week and their notes. Sometimes I use it to generated a current state report or something similar for a particular body of work. This report goes in my work diary as a record of how the work week went. The quick task add is a simple tool that has several fields on it and has a bunch of hotkeys for setting specific duedates (like today, tomorrow, etc...), specific contexts (implemented as tags with the other webapp but I use the Context field here) and a couple of other things. It allows me to use launchy to run it and by just typing a summary and hitting a key or two I can create a task and be on my merry way.

I'm running into limitations with excessive usage. The tools themselves will not be run excessively AT ALL. I'm just running into this after running them several times in a row to get used to the API. The C# API that's on the site is a little spotty but I've used it as a starting point. It gets a new token every time you use it which is the issue I believe. Would it be best to just cache off the token and expire it before getting a new one or is there something else afoot? For example, I am getting locked out after running the summary tool maybe 6-8 times and returning several tasks each time. That doesn't seem *that* excessive though I COMPLETELY understand why you are doing it. From the message that's returned it may not be getting the token that is causing the issue - it could just be the combination of API calls. I'm doing nothing but getting the token and then calling gettasks with each run so the number of calls doesn't exceed 120 in two hours, though the rate of calls would predict that I would if I continued with that usage.

Just wanted to throw it out there and see what you guys said. The API is straightforward. I don't see the tools as anything that would ever be used by anyone but me - they just fit within my system perfectly (actually they are my system - I created them to fill the gaps I had before).

Thx,

benster
Jake

Toodledo Founder
Posted: Apr 17, 2009
Score: 0 Reference
It is probably due to the C# API using the API excessively. You should definitely cache the token and reuse it until it expires. If the API notices more than one token request every 15 minutes it will start throttling the connection out of self preservation.

Another thing you can do is create and use an AppID. If you create a support ticket and explain your usage and give us your AppID, we can give you an exemption to the API limitations.
jared

Posted: Apr 22, 2009
Score: 0 Reference
Could you place this snippet of info:

> if the API notices more than one token request every 15 minutes it will start throttling

into the "Rate Limiting" section of:

http://www.toodledo.com/info/api_doc.php

I was only making 12 requests an hour (one auth + one getTasks every 10 minutes from a stateless cron job) but was also getting the excessive API response. Now I know why. Other devs hacking together their first scripts are also likely to skip the auth token caching initially while they focus on the rest of the API calls even though you ask/tell people to cache earlier in the doc.
Jake

Toodledo Founder
Posted: Apr 22, 2009
Score: 0 Reference
Thanks for the suggestion.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.