Timesheet Entry into Project Server Using Rest API

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 08:28:05

问题


I'm trying to add timesheet entries against some specific task which is available in the MS Project Server 2013. I have ways of creating TASK in Project Server using REST endpoints, but could not find a way straight forward for the timesheet. I have gathered few details out of some scrutiny at my end:

To See the Complete Meta Data: 
http://>/PWA/_api/ProjectData/$metadata - You can get the field details, Where as I need to know in specific the Entity for TimeSheet.

To See the Complete Time Sheet Period Available:
http://>/PWA/_api/ProjectServer/TimeSheetPeriods - You can see all the available TimeSheet Periods.

I know TimeSheet stays as separate entity and doesn't belong to usual Project Entities.

My Query here to know in specific the Entity that is dealt for timesheet add & update. Please help me with endpoints including the save, publish and checkout!


回答1:


How are you adding the tasks? Http requests? Did you develop some app?

I tried a few ways to add actuals to timesheets already created using REST endpoints, via Postman, without success. It always responds with this error: "The security validation for this page is invalid.", I think I'm missing some headers.

This endpoints were as close as i got:

Submit Timesheet
POST - http://>/pwa/_api/ProjectServer/TimeSheetPeriods('periodid')/TimeSheet/submit(comment)

Update Timesheet
POST - http://>/pwa/_api/ProjectServer/TimeSheetPeriods('periodid')/TimeSheet/update()

I saw this endpoints here.

Hope this helps!



来源:https://stackoverflow.com/questions/54485790/timesheet-entry-into-project-server-using-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!