Tasks by Section?

Currently querying the api using ruby. According to the documentation there should be a resource subtype in the response showing the section that the task belongs to, however I get no such key.

I want to grab all the tasks of a project, organised by sections, so that I can output that to a google sheet.

The resource_subtype indicates what type of item the task is; it doesn’t tell you anything about what section (if any) it’s in. For that, you want the memberships property on the task.

2 Likes

Thank you for your reply. The output I get from
https://app.asana.com/api/1.0/projects/projectnumber/tasks/
only contains the following keys:

id
gid
name
resource_type: task

How can I get more keys, such as membership?

To include more properties, use opt_fields or opt_expand. For more on that syntax, see:

In the case of memberships, you want a syntax like this:
GET /projects/457174164820109/tasks?opt_expand=memberships

2 Likes

Excellent, thank you.