Getting PlannedValue and EarnedValue for Project from API (On Prem, Web API, C#)
In the database, dbo.Project table has two fields - PlannedValue & EarnedValue. When using the API to retrieve ALL properties for the object, however, these fields are not coming through. Can you please let me know how I can retrieve these columns through the API? Thanks!
Example code:
Guid projId = emptyGuid;
if (id.HasValue) projId = Guid.Parse(id.ToString());
var modProp = new ModProp(); // Model Properties, used in API calls to specify columns returned
modProp.AddModelPropertyList("Project", "all");
Project thisProject = client.Project.Get(projId, modProp); // get all properties of the the Project
var plannedValue = thisProject.PlannedValue; // this does not exist
var earnedValue = thisProject.EarnedValue; // this does not exist
-
Official comment
Hello Rachel,
Those properties are not exposed on the Project model via the API's. For a list of properties for the Project, please use this reference.https://www.projectinsight.net/api-docs/help/model/project
If you have any further questions, please let us know.
Thank you,
Robert -
Ok, so the only way to get them is directly querying the database? Will they be added to the Project Model to be accessed by the API in the future?
Thanks,
Rachel
0 -
Hello Rachel,
We can make that property available and in the near future. I'll follow-up when we introduce the properties for release.
Thank you,
Robert0 -
Thanks, Robert. That would be great. We are trying to stay strictly with the API so we are ok on future upgrades. Thanks for your response.
Rachel
0
Please sign in to leave a comment.
Comments
4 comments