Forum Discussion

mhugo's avatar
mhugo
Copper Contributor
Jan 10, 2020

New PWA site metadata error

When trying to use the PowerBi data pack for PWA I received the following error:


OData: The feed's metadata document appears to be invalid. Error


I then  tried to verify if the metadata for the PWA site was actually good, but when I entered the URL [//https://<My Site>/<PWA>/_api/ProjectData/$metadata] it doesn't return any information and gives the following error message:


An IEdmModel instance was found that failed validation


Anybody knows what is the problem and how I can fix it?

    • mhugo's avatar
      mhugo
      Copper Contributor
      Thanks Paul! After a lot of troubleshooting, I found that we had a custom field called "Project#" - when I changed that to "Project Number" it resolved the issue!

      Much appreciated.
  • Lewis-H's avatar
    Lewis-H
    Iron Contributor

    mhugo 

     

    I am using a workflow to create a project in project server 2013. This seems like a fairly common operation, but I need to set a few pieces of information when I create the project that are not available in the constructor.

    Process Outline

    for my own purposes I am using Chrome app DHC for creating these requests.

    I use headers:

      Accept:       application/json;odata=verbose
      Content-Type: application/json;odata=verbose
    1. get the Context (X-RequestDigest):

      dev1projects/PWA/_api/contextinfo [POST empty body]
    2. Pick a Project:

      dev1projects/PWA/_api/ProjectServer/Projects?$Top=1
      [GET]
    3. Check out the project:

      dev1projects/PWA/_api/ProjectServer/Projects('theguidi-just-pick-from-theprojectabove')/checkOut()
      //Add Header X-RequestDigest:0xTheStringFromTheContextQuery(d/GetContextWebInformation/FormDigestValue)
      [POST empty body]
    4. Update the Draft item:

      dev1projects/PWA/_api/ProjectServer/Projects('projectid')/Draft/update()
      //Add Header X-RequestDigest:0xTheStringFromTheContextQuery(d/GetContextWebInformation/FormDigestValue)
      [POST]
      {"__metadata":{"type":"PS.DraftProject"},"Name":"Test 679"}
    5. Check In the Draft:

      dev1projects/PWA/_api/ProjectServer/Projects('theguidi-just-pick-from-theprojectabove')/Draft/checkIn()
      //Add Header X-RequestDigest:0xTheStringFromTheContextQuery(d/GetContextWebInformation/FormDigestValue)
      [POST empty body]

Share