문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top