If I enter the project name in a project list then based on that project name it should create a team subsite which will contain a one task list.

for example there are a 100 team subsites and each subsite will have one task list.

So, I want today's task from all the 100 subsite's task list in a single API call whether it is rest or graph API or any other solution for it.

Note: Name of task list is same for all subsites.

Thanks

A few days ago there was a question along the same lines here: Retrieve one library from each site and show the last item using ajax

You would need to first get all subsites using this rest endpoint:/_api/web/webs?$expand=Webs

Then loop the returned data and grab all items from the list that match the current date. Here's the base endpoint for that (You need to replace "Projects" with your list name): /_api/web/lists/GetByTitle('Projects')/items

You would need to prepend the actual url from the first loop for each site to the endpoint.

It's not super hard to make using client side javascript, but it does take a bit of time to get everything right.

Another option could be to use search to fetch those tasks with due date today, something like this https://www.kalmstrom.com/tips/SPSearch-My-Open-Tasks.htm

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.