# Tasks by Section?

**URL:** <https://forum.asana.com/t/tasks-by-section/52218>\
**Category:** API & Developers\
**Tags:** tasks\
**Created:** [11 June 2019 14:35 UTC](https://forum.asana.com/t/tasks-by-section/52218 "2019-06-11T14:35:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duarte\_Martins1](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/duarte_martins1/32/45200_2.png) [@Duarte\_Martins1](https://forum.asana.com/u/Duarte_Martins1)\
**Post date:** [11 June 2019 14:35 UTC](https://forum.asana.com/t/tasks-by-section/52218/1 "2019-06-11T14:35:25Z")

</div>

Currently querying the api using ruby. According to the [documentation](https://asana.com/developers/api-reference/tasks) 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.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [11 June 2019 15:15 UTC](https://forum.asana.com/t/tasks-by-section/52218/2 "2019-06-11T15:15:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Duarte\_Martins1](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/duarte_martins1/32/45200_2.png) [@Duarte\_Martins1](https://forum.asana.com/u/Duarte_Martins1)\
**Post date:** [11 June 2019 15:36 UTC](https://forum.asana.com/t/tasks-by-section/52218/3 "2019-06-11T15:36:10Z")

</div>

Thank you for your reply. The output I get from  
[https://app.asana.com/api/1.0/projects/projectnumber/tasks/](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?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [11 June 2019 16:44 UTC](https://forum.asana.com/t/tasks-by-section/52218/4 "2019-06-11T16:44:48Z")

</div>

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

> **[Build an app with Asana](https://developers.asana.com/docs#input-output-options)**
>
> Learn the basics of Asana's developer platform

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

---

<div class="post-metadata">

**Author:** ![Duarte\_Martins1](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/duarte_martins1/32/45200_2.png) [@Duarte\_Martins1](https://forum.asana.com/u/Duarte_Martins1)\
**Post date:** [11 June 2019 16:54 UTC](https://forum.asana.com/t/tasks-by-section/52218/5 "2019-06-11T16:54:16Z")

</div>

Excellent, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 18:58 UTC](https://forum.asana.com/t/tasks-by-section/52218/6 "2025-05-30T18:58:00Z")

</div>


