0

How do i retrieve the tasks for a project under the priority heading?

For example i have recruitment project, i want to retrieve tasks under "Interviewed" heading (priority heading)

Thanks

Imran Syed
  • 81
  • 3

1 Answers1

0

There isn't currently a way to only get tasks in a given section, so the only way to do this at the moment is to fetch all tasks for the project and then filter on your side. Fortunately, the API will return the tasks in the appropriate order such that all the tasks in a given section appear after it.

It's clunky, and we do intend to provide better support for sections at some point in the future, but it's not on our immediate roadmap so I'd definitely recommend this workaround for now. If the response is simply too large, one hack could be to get the ID of the "Interviewed:" task, then fetch only the IDs from the project (GET /projects/.../tasks?opt_fields=id), and then iterate over the tasks by ID. I'd only recommend this approach if the project is genuinely too big to fetch at once, though.

agnoster
  • 3,744
  • 2
  • 21
  • 29