We could check the internal names using the following xml from URL:
https://{site collection name}/sites/pwa/_api/ProjectServer/CustomFields
But we couldn't use internal names for calling REST project online. REST project use custom field name and not internal ones.
However, we could get that name from PowerBI desktop.
Here's how I did it:
- Open PowerBI
- Click on GetData
- Click on Other > OData Feed
- Enter URL https://{site collection name}/sites/pwa/_api/projectdata
- Mark Projects and Click Load
- Search for your custom field on FIELDS list on the right
- You will find your custom field name like this
So "Initiative/Project ID" will become "InitiativeProjectID", we could use this name to call REST project online. This is an URL example on how we could find & retrieve "Initiative/Project ID".
https://{site collection name}/sites/pwa/_api/ProjectData/Projects()?$filter=InitiativeProjectID eq 'PROJECTID001' and ProjectType ne 7&$select=InitiativeProjectID
No comments:
Post a Comment