Pregunta

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

¿Fue útil?

Solución

(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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top