Reputation: 3793
Asana API provides access to data stored in Asana workspaces. What is the best way to get list of all tasks in workspace?
One can find out the list of projects and users bound to workspace. Then collect all tasks of each individual project, and all tasks assigned to particular assignee. Merging all the sets will produce the set of tasks accessible to user represented by API token used.
If all API requests are sent sequentially - it is 2+users+projects requests, that operation is quite long for bigger workspaces. If API requests are sent in parallel, then there can be up to users+projects concurrent requests. What level of concurrency Asana API endpoint will be still happy about? Or what is recommended approach?
Upvotes: 3
Views: 3205
Reputation: 11
Think the more relevant use case is to display all tasks for Today, across all workspaces.
User journey is to update all tasks across workspaces, then actually do the tasks without having to be in multiple workspaces, then update as the day progresses...
Would that be possible?
Upvotes: 1
Reputation: 2079
thanks for your question.
Getting a complete dump of all tasks in a workspace could potentially generate a lot of data (this will be very manageable when you're just starting out, but not once you've been actively working in a workspace for a while). We feel this is an advanced use case and there are significant considerations in getting it to work and scale well, so the API does not provide a good mechanism for this yet (as of 4/11/2012).
I think the main reason you might want this ability is that you want to export the data into some other tool, or sync it with another database. We very much want to support our developers in getting their data where they need it to be, and are looking into how best to serve you in this way. Providing an export feature is one way to do that, but there are other features we are considering, like WebHooks or a sync API, that might prove much more useful and flexible over time.
In the meantime, while we do support lots of parallel requests (as any respectable REST API should), we might impose rate limiting and the performance you're likely to see at this point may make this approach intractable. It may happen to work for you now, but I don't recommend it. :) We'll be prioritizing this need against other API requests, of course, and keep you posted as we make progress.
Upvotes: 4