Microsoft Project REST API

Copper Contributor

Hello community,

 

I need your help. I'm trying to retrieve data about assignment through the REST API. I would like to have the same data from the Task view of the Project Web App.

 

Delta_BenoitWILLEMS_0-1725366685026.png

 


This is the view where we can see all tasks assigned to a resource and the number of hours worked per day.

I'm able to do an API call to retrieve the list of all assignments of a resource. I can also retrieve the total of hours worked for a task (I think the field is "ActualWork").

But I can't find the number of hours worked per day. The one with the red rectangle.

 

Could someone help me where to find this information, please?

 

Thank you for your help.

 

Benoit W.

8 Replies
If i understood the question correctly, you are looking for the work planned for each recourse on a timeline, you can find what you are looking for in the AssignmentTimephasedDataSet

@malshayeb Thank you for your prompt reply.

 

The table that you are speaking about is in the ODATA end point. Not in the API ? Right ?

 

And the problem with the ODATA is the fact that values are read only. I want to be able to edit its values.

 

Benoit W

i thought you are only looking to find the effort in a specific day, the only thing i can think of at the moment is this page about the rest API endpoints, in the EnterpriseResources/Assignments and the GetTimePhaseByURL    section of the page should give you a starting point, keep in mind some of those resources are really old. can i ask you what is the end goal you have in mind ? 

Thank you for the link. I already found it and use it to try to achieve what I want, but without any success.

My goal is to create an application that will be able to interact with Project Server.
This application will allow the resources to add/edit the number of hours worked on a specific task on a specific day.

To provide you more information, in my work team, we use Toggl to track our time. And I will be able to create a connector that will populate the MS Project Server automatically.

Thank you for your Time.

Benoit W.
are you using Project server or Project online ?
I'm using Project Server

Benoit W.
ok thank you, so you want to bring Actuals from the 3rd party timesheet app into Project server, in this scenario i wouldnt look into the planned work in the assignment i would look into the timesheet API, configure the Timesheet in POL , then use the REST API to
1-Create resource timesheet for the period
2-Create the Lines
3- add the actual time
4-submit the TS

with that the actuals can be imported to the Project plans
Thank you for your reply. I'll try in that way.

Benoit W.