Background:
I'm working with the MS Project Online REST API to fetch tasks and their corresponding task links for a specific project. Currently, I'm making individual API calls for each task and its predecessors, which results in thousands of requests (e.g., 3,000 tasks leading to over 6,000 API calls).
This approach leads to significant performance bottlenecks, taking over 13 minutes to process 3,000 tasks.
Current Approach:
I'm using HttpClient in C# with parallel processing to optimize concurrency, but the sheer number of API calls remains the primary bottleneck.
Fetching tasks:
/_api/ProjectServer/Projects('{ProjectId}')/Tasks('{taskId}')/Predecessors
Fetching task links:
/_api/ProjectServer/Projects('{ProjectId}')/TaskLinks('{taskLinkId}')/Start
Is there a way to optimize these calls?
For example, fetching all tasks and task links for a project in a single or minimal set of requests?