API call to get all tasks (with task details) for a particular project

The following API call tells me all the tasks for a given project:
https://app.asana.com/api/1.0/projects/<project id>/tasks
but the details on the tasks is very sparse. It only includes the task name and task id.

I am looking for a way to pull all tasks for a project and in the least, get the task name and the due date. Is this possible in one API call?

Check the opt_fields

3 Likes

Thanks for the hint!

This ended up being my solution.
https://app.asana.com/api/1.0/projects/<project_id>/tasks?opt_fields='name,due_on,completed,memberships.section.name'

Posting it here in case someone else has the same question in the future.

13 Likes

Thanks so much for posting your solution @gniting, it proved valuable to me today! : )

1 Like

You guys could use the project API, to get all the project’s guid,
And then for each project guid, call the tasks API.

This will get you all data in your Asana