Looking for
REST API References or REST API Models?
Models and Parameters
Models are objects you request. For example: A specific project can be requested based on the project's unique identifying number:
curl -X GET --header 'Accept: application/json'
'https://yourdomain.projectinsight.net/api/project/list?ids={insert the id here}
In order to obtain a list of all Projects in the workspace the search? endpoint can be used:
curl -X GET --header 'Accept: application/json'
'https://yourdomain.projectinsight.net/api/project/search?
Parameters allow searches to be narrowed down, for example if only active Projects should be listed the isActive parameter is used.
curl -X GET --header 'Accept: application/json'
'https://yourdomain.projectinsight.net/api/project/search?isActive=true
By adding "isActive=True" as a parameter on the endpoint the number of projects Project Insight returns are limited based on the parameters set.
Model Properties
Default Model Properties
Default Model Properties define a list of model-properties returned when requesting a model in Project Insight.
For example, if you searched for all active projects as shown above, Project Insight would return the following default properties for each Project listed:
- CompanyDefault_Id
- CustomFieldValue_Id
- Department_Id
- DurationSeconds
- EndDateTimeUserLocal
- EndDateTimeUTC
- Name
- ProjectState
- ProjectStatus_Id
- ProjectType_Id
- ScheduleStartDate
- StartDateTimeUTC
- UrlFull
- WorkPercentComplete
- WorkSeconds
These are the default property values we return for each project when properties are not specified.
To view all properties for the Project Model see: Project Model Properties
Selecting Model Properties
To specify specific model properties for a model use the modelProperties= endpoint, each property should be listed with commas delimiting separate properties.
curl -X GET --header 'Accept: application/json'
'https://yourdomain.projectinsight.net/api/project/search?isActive=true&modelProperties=Name,ProjectType,ProjectStatus,WorkpercentComplete,PrimaryProjectManager
This call will return the Project Type, Project Status, Work Percent Complete, and Primary Project Manager properties for every Project returned.
Correlated Models
Some properties are primitive data types. Primitive data types have simple values such as a string, date, guid, or integer value. For example, the Description property of a project returns the string of text written in the Description text area.
Many properties requested will have properties of their own.
For example a Primary Project Manager is a User. The User model contains its own properties. In order to request the list of properties in a nested model enter a semicolon after the name of the nested model and enter [ModelType]:[Properties].
curl -X GET --header 'Accept: application/json'
'https://yourdomain.projectinsight.net/api/project/search?isActive=true&modelProperties=Name,ProjectType,ProjectStatus,WorkpercentComplete,PrimaryProjectManager;User:FirstName,LastName
In the above example, the Primary Project Manager's, First Name and Last Name is requested.
- This call could also be made with no properties specified, in which case the call would return the Default Model Properties of each Primary Project Manager. To do this omit User: and only include PrimaryProjectManager
Another example is to return a Project model with the Tasks property and all sub-tasks of Tasks.
'https://yourdomain.projectinsight.net/api/project/[Guid]?modelProperties=default,Tasks;Task:ItemNumber,Name,TasksIn the example above, the Project model will be returned with the default columns and also the Tasks property (an array of top level Task models). The the keyword "default" is used to return all of the "default" columns of the Project model, plus an additional non-default property "Tasks." A semi-colon is used to separate the properties being requested for the Project model (the default model returned in this example. Now properties added after the colon ":" are attributed to the Task model specified because of this part of the string ";Tasks:". In the example above for each of the Task models in the Tasks property of the Project model, the task ItemNumber, Name, and child Tasks will be returned (recursively).
Below are some video examples of how to use Model Properties.
Using Model Properties in REST API Call
Helpful Links
Learn more about Project Insight REST API references: https://www.projectinsight.net/api-docs/help/overview
Review Project Insight REST API models: https://www.projectinsight.net/api-docs/help/api-models
Learn how Project Insight REST API request and response formats work: https://support.projectinsight.com/hc/en-us/articles/360027390392-Request-Response-Format
Watch how to use model properties in a Project Insight REST API call: Using Model Properties in REST API Call
For additional help with Project Insight REST API setup or usage, visit Project Insight Support at projectinsight.com/support.
About Project Insight
Project Insight is project and portfolio management software for growing companies that need one connected place to manage projects, resources, budgets, schedules, time tracking, reporting, and work happening across tools like Jira, Azure DevOps, Salesforce, QuickBooks Online, NetSuite, Microsoft Project, and Power BI.
Comments
0 comments
Please sign in to leave a comment.