Reputation: 31
I'm trying to get all the "Task Details" for a give "Plan".
I can get the "Plan", "Buckets", "Tasks" using {plan-id} https://graph.microsoft.com/beta/planner/plans/eAk8BBGJfU6e2_SQexZPtxxxxxx https://graph.microsoft.com/beta/planner/plans/eAk8BBGJfU6e2_SQexZPtxxxxxx/buckets https://graph.microsoft.com/beta/planner/plans/eAk8BBGJfU6e2_SQexZPtxxxxxx/tasks
But the "Task Details" uses {task-id} https://graph.microsoft.com/beta/planner/tasks/{task-id}/details
Is there a way to write a single query that will return all the task details for all tasks in the plan?
Cheers, Mike
Upvotes: 3
Views: 1924
Reputation: 1508
You can now expand details when reading tasks in plan. /plans/id/tasks?$expand=details
Outdated previous reply:
We don't currently have a way to get this information in a single request right now. The standard way is to get the tasks, then make separate calls for the details of the tasks that you are interested in. We're evaluating whether this is something that should be added. If you don't mind, can you explain your high-level scenario and what kind of information you are interested in task details? That would provide valuable information for the decision-making process.
Upvotes: 2
Reputation: 12245
I'm using batching for similar thing. You can get the list of tasks and then launch a number of batched queries to get details of those tasks (note that 20 is currently the max number of items in the batch query). Also, you can run these queries in parallel if you want to. Using these optimizations, you should be able to get all data for a plan of something like 100 tasks in milliseconds.
@Tarkan - I'm using that for synchronization with a third-party (our) application.
Upvotes: 0