Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3753

How to Batch API Requests in MS Project Online REST API to Optimize Performance?

$
0
0

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?


Viewing all articles
Browse latest Browse all 3753

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>