Jul 24 2018 11:53 PM
Hi! Has anyone got any idea if there has been any recent changes in the API space for Project. To be more specific in terms of EnterpriseResources like any metadata changes?
Jul 25 2018 06:07 AM
Are you hoping for some new things? or something in particular isn't the same for you anymore?
Jul 25 2018 03:43 PM
I have an integration team who has come to me and raised a concern that the code in place which was working earlier is failing now. I then checked what is being sent to query the data and found one of the metadata property sent as a filter doesnt exist in the metadata structure. Hence upon modifying their query to remove that worked. Thats the reason just wondering if anything has changed in this context.
Jul 25 2018 03:48 PM
Jul 25 2018 03:58 PM
Hey Ian, thanks your quick response. The input data is
{
"Id": "ResourceGUID",
"IsActive": "false",
"__metadata": {
"type": "PS.EnterpriseResource"
}
}
Which is being sent to
https://xxxx.sharepoint.com/sites/pwa/_api/ProjectServer/EnterpriseResources/GetById('ResourceGUID')
Which produced the error response
{
"odata.error": {
"code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
"message": {
"lang": "en-US",
"value": "A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value."
}
}
Jul 26 2018 12:29 PM
I'm not well versed in the structure of the query you provided. I've typically queried against _api/ProjectData instead of /ProjectServer.
for example:
Here's the reference
all: https://docs.microsoft.com/en-us/previous-versions/office/project-odata/jj163015(v%3doffice.15)
resource type: https://docs.microsoft.com/en-us/previous-versions/office/project-odata/jj163027(v%3doffice.15)
Valid Resource Types: https://msdn.microsoft.com/en-us/library/jj232846%28v=office.15%29?f=255&MSPPError=-2147217396