Project Online ReST API Http Errors

Hello Everyone,
I'm trying to update an existing project using ReST API call as mentioned in:
When I try to execute it I'm getting "Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (412) Precondition Failed.""
Another error occurred when I tried to create a new project resource as well as when I try to delete existing tasks http://<SITECOLLECTION>/<SITE>/_api/ProjectServer/Projects('projectid')/Draft/Tasks('taskid')/deleteObject()
I was getting 409 Conflict error.
What can be the reason of these issues?

Thanks &amp; Regards,
0 Replies