Forum Discussion
Project Online to retrieve baseline dates for tasks within projects.
- Feb 27, 2024
Hello AbleMPeter ,
If you want to navigate to a related data endpoint, you have to provide all keys - for example:
{pwaUrl}/_api/ProjectData/TaskBaselines(BaselineNumber=0,ProjectId=guid'9c5ee037-4c4e-ee11-b221-00155dd8b40c',TaskId=guid'a85ee037-4c4e-ee11-b221-00155dd8b40c')/Task
That would return the Task details for that 1 task though, not the task baseline details.
You can either get all task baseline details by going to:
{pwaUrl}/_api/ProjectData/TaskBaselines
Or grab a specific task's baseline details by going to - update the GUIDs:
{pwaUrl}/_api/ProjectData/TaskBaselines(BaselineNumber=0,ProjectId=guid'9c5ee037-4c4e-ee11-b221-00155dd8b40c',TaskId=guid'a85ee037-4c4e-ee11-b221-00155dd8b40c')
Paul
Hello AbleMPeter
The metadata document is very useful for finding data: https://{pwaUrl}/_api/ProjectData/$metadata
You need the following endpoint: /_api/ProjectData/TaskBaselines
Paul
- Paul_MatherFeb 26, 2024MVP
Yes AbleMPeter , take a look at the data returned when you can. You'll see a property called BaselineNumber that will identify the baseline.
Paul
- AbleMPeterFeb 26, 2024Copper ContributorCan you please let me know how to call this API? Is there any API documentation? /_api/ProjectData/TaskBaselines, what are the parameters to pass to fetch the details?
- Paul_MatherFeb 26, 2024MVP
Hello AbleMPeter ,
It is just a different endpoint in the same API you are already using. Calling that endpoint will will give you all task baselines for all tasks / projects.
Paul