Forum Discussion
Project Online to retrieve baseline dates for tasks within projects.
Our team is currently working on a project that involves integrating with Project Online to retrieve baseline dates for tasks within projects. We are reaching out to inquire about accessing baseline dates via the Project Online API. We have attempted to retrieve the data using the following API endpoint: "{ProjectOnlineUrl}/_api/ProjectData/Projects(guid'{ProjectId}')/Tasks" However, despite our efforts, we have encountered difficulties in obtaining baseline dates using this API. Could you please provide us with information or documentation regarding how we can successfully retrieve baseline dates (such as Baseline Start and Baseline Finish) for tasks using the Project Online API? We are particularly interested in understanding the correct endpoint or method to access this data and any specific parameters or considerations we need to be aware of. Additionally, if there are any restrictions, prerequisites, or best practices associated with accessing baseline dates via the API, we would appreciate any guidance or resources you can provide. Your expertise and assistance in this matter would be invaluable to our project. Thank you very much for your attention to this request.
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
- AbleMPeterCopper ContributorWill I get the task baselines (BaseLine1, BaseLine2, BaseLine3, etc.) from a project using the above endpoint?
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