Answered by:
CRUD Operations Project Server API

Question
-
Hi,
I m using Project Server 2013, and i would like to use an API to do CRUD operations into my projects.
example:
I have got the project with few tasks, subtasks and how can i get all the informations like when the task begins, finish, ressources, subtasks, previous tasks and the other informations about the project.
Which type of API should i use to perform this?
How to use the API and even to do tests?
Can i create, modify and delete projects and tasks with this API ?
Thank you for your help.
- Edited by Najar Anouar Monday, September 5, 2016 2:16 PM
Monday, September 5, 2016 12:43 PM
Answers
-
Hello,
Try the SDK:https://www.microsoft.com/en-gb/download/details.aspx?id=30435
Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads
- Marked as answer by Najar Anouar Wednesday, September 7, 2016 8:14 AM
Monday, September 5, 2016 3:59 PM
All replies
-
Hello,
I would go via the CSOM / JSOM API:
https://msdn.microsoft.com/en-us/library/office/jj163123.aspx
Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads
Monday, September 5, 2016 2:11 PM -
Hi Paul,
Thanks for your response.
I tested CSOM but i don't know how to use it. I was able to get only the informations but when i want to add, update or remove data, i don't have an idea how to do it (POST i guess, but how?).
Do you have a tutorial that explain how to use this service?
And what are the necessary tools to do tests ... ?
Thank you.
Monday, September 5, 2016 2:30 PM -
Hello,
If you want to use .NET CSOM, see the example here: https://msdn.microsoft.com/en-us/library/office/jj163064.aspx
If you want to use REST, see the samples here: https://github.com/OfficeDev/Project-Samples/tree/master/O365-Project-Online-REST-Samples
Other samples here: https://github.com/OfficeDev/Project-Samples
Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads
Monday, September 5, 2016 2:37 PM -
Thank you Paul.
My problem is that my customer wants me to have a customized calendar of tasks with a customize gantt chart.
So i tried to use Web Part Component, but it's limited.
I used CSOM and i already used the script that you linked to me.
I don't know how to do filter... like to get tasks where start date are today for exemple.
or to filter tasks/subtasks... for each project.
I just have these methods :
ProjectCreationInformation() => this to create project
CreateContext() => to get the informations of project
But how about tasks?
Anouar
- Edited by Najar Anouar Monday, September 5, 2016 3:47 PM
Monday, September 5, 2016 3:39 PM -
Hello,
Try the SDK:https://www.microsoft.com/en-gb/download/details.aspx?id=30435
Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads
- Marked as answer by Najar Anouar Wednesday, September 7, 2016 8:14 AM
Monday, September 5, 2016 3:59 PM