GET all tasks (w/ details) by Team ID?

Is it possible to create a query URL to GET all tasks by Team ID? I’m somewhat a newbie at this so apologies if it’s a dumb question. Note, I have pored over the API docs and it seems like workspaces/{workspace_gid}/tasks/search could work using opt_fields but I’m not sure of the proper syntax. Any help would be greatly appreciated!

Yes, the task search endpoint is one possible solution

GET /workspaces/xxx/tasks/search?team.any=yyyyy&opt_fields=id,name,…&modified_on.before=2020-02-15&etc…

1 Like

Hi Frederic, thanks for the fast response! I got this error: Unable to retrieve data. Try a different URL or check to make sure the resource is available with this query:

GET /workspaces/{workspaceID#}/tasks /search?team.any={teamID#}&opt_fields=projects,name,assignee,due_on,completed_at&limit=100

What am I doing wrong?

Thanks again!

Not sure if this is the issue but in the text you posted, there is an unwanted space after tasks and before /search. Does it help when you remove that?

The space must have been a problem because . . . I got a different error message :wink:

https://app.asana.com/api/1.0/workspaces/{workspaceID#}/tasks/search?team.any={teamID#}&opt_fields=projects,name,assignee,due_on,completed_at&limit=100

yields

Service responded with exception status (400): {“errors”:[{“message”:“You must specify at least one search filter.”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors”}]}

Argh