Guys, I'm trying to update a few weeks the assignment of a particular resource. When searching the web I found Some articles from microsoft:
https://msdn.microsoft.com/en-us/library/office/jj669912.aspx#mergesyntax
On top of this article I started to develop my code. And to make the request to the service is the access denied error (404-Forbidden). Does anyone have any idea what can be?
var updateEndPoint = oAuth.ProjectURL + "/_api/ProjectServer/EnterpriseResources('" + oAuth.User.Profile.ResourceId + "')/Assignments('" + assingment.AssignmentId + "')"; var itemPayload = { '__metadata': { 'type': 'PS.StatusAssignment' }, 'PercentComplete': 70 }; $.ajax({ url: updateEndPoint, type: "POST", data: JSON.stringify(itemPayload), contentType: "application/json;odata=verbose", headers: {"Accept": "application/json;odata=verbose","X-HTTP-Method": "PATCH","If-Match": "*" }, success: function (data) { var x = data; }, error: function (data, error,a) { var x = error; } });