Phuoc Do
Phuoc Do

Reputation: 1344

Get asana tasks in project with assignee information

I am trying to retrieve asana tasks within a project. I would like to retrieve assignee information in the same query. I tried this query and got assignee id:

curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee

I want get assignee name. So I include "opt_expand=assignee":

curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee&opt_expand=assignee

I still don't get assignee name. What's the way to do this?

Thanks

Upvotes: 3

Views: 1164

Answers (1)

Greg S
Greg S

Reputation: 2079

(I work at Asana)

The interplay between opt_fields and opt_expand is actually a bit complicated, we should clarify in the documentation. The latter ends up superseded by - not additive with - the former.

The best way to achieve what you want would be to NOT use opt_expand and to add assignee.name to the list of fields in opt_fields.

Upvotes: 8

Related Questions