Project Online ReST API fetch recently updated tasks, assignments

Brass Contributor

Hello Everyone,

 

I want to fetch recently updated tasks, assignments from Project Online. Currently I've included a filter to fetch projects and related tasks, assignments by published date time. But when I execute it also includes newly created project and related tasks, assignments. Project, task, assignment creation module executes before update module. How this scenario can be handle? Is it possible to create a flag in the Project Online that will auto-update to 1 whenever a user makes any manual changes in the task, assignment?

 

Thanks & Regards,

Rohan

4 Replies

Hello @rohanw24,

Can you used the created date to filter out newly created projects / tasks / assignments?

Paul

Hi @Paul Mather,

While filtering projects I'm using this API uri:

https://example.sharepoint.com/sites/pwa/_api/ProjectServer/Projects?$filter=lastSavedDate  gt $DateCriteria&isCheckedOut=true


$DateCriteria will contain timestamp when the application was successfully executed. So that it will consider only those projects that were saved after provided $DateCriteria and which are checked out. Could you please let me know your thoughts on this logic?

Thanks & Regards,
Rohan

Hi @rohanw24 ,

I think you will still get newly created data but the best way to see if the logic is correct is to test every single scenario in Project Online and executing your application.

Paul

Hi @Paul Mather ,

I've changed my filter criteria to:

https://example.sharepoint.com/sites/pwa/_api/ProjectServer/Projects?$filter=CreatedDate lt datetime'$dateCriteria'&LastPublishedDate gt datetime'$dateCriteria'