0

Since sections in Asana are usual tasks, they can be completed. Asana API provides an ability to receive sections of a project https://asana.com/developers/api-reference/projects#sections, but unfortunately, it returns all sections including the completed one. Are there any other ways to receive only active sections or at least the completion flag for sections?

Dmytro Nesteriuk
  • 8,315
  • 1
  • 18
  • 14

1 Answers1

0

You can query for incomplete tasks in a project by using completed_since=now when querying for tasks. However, there is no way to scope that query to only return sections within the project.

However, when querying for a list of objects the Asana API will return a compact representation of those objects, this is what you get when calling /sections on a project. In order to return specific fields on the object you can use field selectors

To get the completed field simply add opt_fields=completed as a query parameter like this:

https://app.asana.com/api/1.0/projects/<PROJECT_ID>/sections?opt_fields=completed
Andrew Noonan
  • 848
  • 6
  • 13
  • this ?opt_fields=completed dosnt work on sections. You can however take the section id and pass this as the id to the tasks api to fetch the task info which can include the completed field – naw103 Jun 06 '18 at 03:45