Can I get tasks by more than one assignees?

Hi,

I want to get all tasks of more than one assignee. In the documentation, there is a get multiple tasks option with assignee parameter: Asana but I need to get the tasks of not only one assignee but other assignees, too. Is it possible?

Thanks,

You can use the Search API

https://developers.asana.com/docs/search-tasks-in-a-workspace

example:

GET /workspaces/xxxxx/tasks/search?assignee.any=11111,22222

But, if you need to query more than 100 tasks, the pagination process of the search api is not the same as the regular api.

Thanks @Frederic_Malenfant . In fact, I only need the number of tasks grouped by a custom field value. That way I probably won’t need any pagination. Do you know is there also a way for it?

Yes, look at the “Custom field parameters” in the search api documentation, you will see you can filter by custom field enum value, or text / number / … many possible combinations.

Hi again,

I tried out the API calls that seemed relevant to my need -which is getting the task count grouped by a specific custom field value independent from the user or project- but still couldn’t find any.

Here is what I tried:

  • “Get a custom field”: this returns the metadata, so I cannot get any task counts with this call.
  • “Get task count of a project”: this returns all the task counts without any option to filter the tasks by custom field values. And I want to get all task counts independent from the project, so this doesn’t work for me.
  • “Search tasks in a workspace”: This seems to be the most relevant one, but it only returns 100 tasks, and the pagination doesn’t work as same as in other API calls.

I want to retrieve the task count grouped by the value of a specific custom field. Isn’t it possible with one API call? Should I write some code to calculate this?