node-asana icon indicating copy to clipboard operation
node-asana copied to clipboard

projects.findAll() giving error

Open marcboscher opened this issue 10 years ago • 1 comments

projects.findAll() is outputing a stack trace.

The underlying error is an HTTP 400 from Asana "Need to specify a workspace or team to paginate!"

Using curl, getting the following correctly returns the entire project list across workspaceshttps://app.asana.com/api/1.0/projects/

But adding a limit causes the same HTTP 400 workspaceshttps://app.asana.com/api/1.0/projects/?limit=50 "Need to specify a workspace or team to paginate!"

Is this normal? Basically is a workspace for projects.findAll() ?

marcboscher avatar May 16 '15 21:05 marcboscher

This is a similar issue to https://github.com/Asana/node-asana/issues/74.

We are examining the viability of cross-workspace queries in the API and are strongly considering deprecating them because of the difficulty we have in supporting them properly - our datastore architecture makes it difficult for us to paginate them, but unpaginated requests do not scale.

We're sorry that this is problematic, and would welcome any feedback on how important this type of feature is. A workaround would be to make separate requests for projects, one for each of the workspaces you care about.

slobak avatar May 21 '15 23:05 slobak