Project OData/API

Copper Contributor

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?

 

6 Replies

Are you hoping for some new things? or something in particular isn't the same for you anymore?

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.

I haven't noticed filters not working. If you care to be more specific about the query that's no longer working for you, I'd be happy to try a similar one.

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."

                              }

               }

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

 

 

Thanks! Ian