# Hi, I want to retrive all task (by project) and see their current section and move task to different section using API

**URL:** <https://forum.asana.com/t/hi-i-want-to-retrive-all-task-by-project-and-see-their-current-section-and-move-task-to-different-section-using-api/140580>\
**Category:** API & Developers\
**Created:** [25 October 2021 16:56 UTC](https://forum.asana.com/t/hi-i-want-to-retrive-all-task-by-project-and-see-their-current-section-and-move-task-to-different-section-using-api/140580 "2021-10-25T16:56:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohisin\_Raza](https://luna1.co/8d76cd.png) [@Mohisin\_Raza](https://forum.asana.com/u/Mohisin_Raza)\
**Post date:** [25 October 2021 16:56 UTC](https://forum.asana.com/t/hi-i-want-to-retrive-all-task-by-project-and-see-their-current-section-and-move-task-to-different-section-using-api/140580/1 "2021-10-25T16:56:47Z")

</div>

Hi, I want to retrieve all tasks by project\_guid, which I can - Using API explorer I’m using GET tasks and it can retrieve all the task but there is no information coming along about the task current section.

secondly, I want to move a task from one section “Todo” to another section for example “Doing”, there is something in docs about updating a task but I’ve no idea what will be the format of _body_ when putting section\_guid.

Looking forward to a response, thanks!

Thanks.

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [25 October 2021 17:44 UTC](https://forum.asana.com/t/hi-i-want-to-retrive-all-task-by-project-and-see-their-current-section-and-move-task-to-different-section-using-api/140580/2 "2021-10-25T17:44:35Z")

</div>

Hi @Mohisin_Raza , welcome to the forum!

To get additional fields, for all entities, you can use the “opt\_fields” parameter, and ask the fields you need.  
You can get the list of all available fields, by requesting one single task, and look at the fields in the result, example:

GET /tasks/xxx  
[Get a task – Asana](https://developers.asana.com/docs/get-a-task)

Then, query all tasks for one project, using:

GET /projects/xxx/tasks.  
[Get tasks from a project – Asana](https://developers.asana.com/docs/get-tasks-from-a-project)

You will get ids and name I think by default.

Then, you can add the opt\_fields parameter:

GET /projets/xxx/tasks/?opt\_fields=memberships.project.name,memberships.section.name  
[Input/Output Options – Asana](https://developers.asana.com/docs/input-output-options)

When you request “name” of an item, you always get the “gid” also in the response.

To add task 123 to a section 789, use this:

POST /sections/789/addTask, with that parameter: {data: {task: 123}}  
[Add task to section – Asana](https://developers.asana.com/docs/add-task-to-section)

---

<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:57 UTC](https://forum.asana.com/t/hi-i-want-to-retrive-all-task-by-project-and-see-their-current-section-and-move-task-to-different-section-using-api/140580/3 "2025-05-30T18:57:05Z")

</div>

Closed on 30 May 2025 18:57 UTC


