Memberships not populated when getting multiple tasks

When I call the tasks endpoint and specify a Task ID, memberships is populated with both the project and section to which the task belongs.

Example call: Get a task

When I call the tasks endpoint without specifying a Task ID, memberships is empty. Therefore, if I need to make a separate call for each task returned to find out its section. It is empty both when I try to get all tasks, or search for multiple tasks.

Example call (get multiple tasks): Get multiple tasks
Example call (search for tasks): Search tasks in a workspace

Is there anyway to retrieve a task’s Membership (including Section) getting multiple tasks?

Add these opt_fields parameters to your query:

opt_fields: β€œβ€¦,memberships.project.gid,memberships.section.gid,…”
You can also ask for project/, …

1 Like

Thank you so much, Frederic. I tested that solution and it resolves my issue.

1 Like