1

I'm playing with ProjectOnline and trying to use REST APIs to create projects and tasks etc. I have managed to add a project using following REST call

https://<domain>.sharepoint.com/sites/pwa/_api/ProjectServer/Projects/Add

However when I try to add Task or a Resource to the created project it gives me error "Cannot find resource for the request Add". Could you please let me know what I'm doing wrong.

My REST call is this

https://<domain>.sharepoint.com/sites/pwa/_api/ProjectServer/Projects('<project ID>')/Tasks/Add

The project ID is the ID of the Project created using the REST call 1.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Thushara
  • 91
  • 1
  • 6

1 Answers1

0

The problem appears to be that you are calling the PublishedProject resource add not the DraftProject resource, your URL needs to be something like this:

/_api/ProjectServer/Projects('projectid')/Draft/Tasks/add(parameters)

The Draft section being key here.

HTH, Martin