| GET,OPTIONS | /v1/pm/project/{Uid} |
|---|
"use strict";
export class PmFinance {
/** @param {{Budget?:number,Spent?:number,EstimatedCost?:number,CrewCost?:number,EquipCost?:number,MatCost?:number,Variance?:number,HealthPct?:number,SpentPct?:number,ProgressPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Budget;
/** @type {number} */
Spent;
/** @type {number} */
EstimatedCost;
/** @type {number} */
CrewCost;
/** @type {number} */
EquipCost;
/** @type {number} */
MatCost;
/** @type {number} */
Variance;
/** @type {number} */
HealthPct;
/** @type {number} */
SpentPct;
/** @type {number} */
ProgressPct;
}
export class PmReadiness {
/** @param {{JobsNoCrew?:number,OpenRoles?:number,EquipmentConflicts?:number,MaterialGaps?:number,TotalGaps?:number,ReadyPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
JobsNoCrew;
/** @type {number} */
OpenRoles;
/** @type {number} */
EquipmentConflicts;
/** @type {number} */
MaterialGaps;
/** @type {number} */
TotalGaps;
/** @type {number} */
ReadyPct;
}
export class PmJobCrew {
/** @param {{ContactID?:number,Name?:string,Rate?:number,BudgetedHours?:number,IsOpen?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactID;
/** @type {string} */
Name;
/** @type {number} */
Rate;
/** @type {number} */
BudgetedHours;
/** @type {boolean} */
IsOpen;
}
export class PmJobResource {
/** @param {{Id?:number,Name?:string,Amount?:number,Qty?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
/** @type {number} */
Amount;
/** @type {number} */
Qty;
}
export class PmJob {
/** @param {{JobID?:number,Name?:string,Description?:string,Status?:string,StartDate?:string,EndDate?:string,CrewCount?:number,BudgetedHours?:number,EquipmentCount?:number,MaterialCount?:number,CrewCost?:number,EquipCost?:number,MatCost?:number,Cost?:number,NoCrew?:boolean,EquipConflict?:boolean,MaterialGap?:boolean,ReadyPct?:number,Crew?:PmJobCrew[],Equipment?:PmJobResource[],Materials?:PmJobResource[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
JobID;
/** @type {string} */
Name;
/** @type {string} */
Description;
/** @type {string} */
Status;
/** @type {string} */
StartDate;
/** @type {string} */
EndDate;
/** @type {number} */
CrewCount;
/** @type {number} */
BudgetedHours;
/** @type {number} */
EquipmentCount;
/** @type {number} */
MaterialCount;
/** @type {number} */
CrewCost;
/** @type {number} */
EquipCost;
/** @type {number} */
MatCost;
/** @type {number} */
Cost;
/** @type {boolean} */
NoCrew;
/** @type {boolean} */
EquipConflict;
/** @type {boolean} */
MaterialGap;
/** @type {number} */
ReadyPct;
/** @type {PmJobCrew[]} */
Crew = [];
/** @type {PmJobResource[]} */
Equipment = [];
/** @type {PmJobResource[]} */
Materials = [];
}
export class PmConflict {
/** @param {{ProjectName?:string,JobName?:string,StartDate?:string,EndDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ProjectName;
/** @type {string} */
JobName;
/** @type {string} */
StartDate;
/** @type {string} */
EndDate;
}
export class PmEquipmentRow {
/** @param {{EquipmentID?:number,Name?:string,EquipmentType?:string,SerialNumber?:string,UsedByJobs?:string,Available?:boolean,Conflicts?:PmConflict[],MaintenanceIntervalDays?:number,LastServiceDate?:string,NextServiceDate?:string,MaintenanceState?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
EquipmentID;
/** @type {string} */
Name;
/** @type {string} */
EquipmentType;
/** @type {string} */
SerialNumber;
/** @type {string} */
UsedByJobs;
/** @type {boolean} */
Available;
/** @type {PmConflict[]} */
Conflicts = [];
/** @type {?number} */
MaintenanceIntervalDays;
/** @type {string} */
LastServiceDate;
/** @type {string} */
NextServiceDate;
/** @type {string} */
MaintenanceState;
}
export class PmMaterialRow {
/** @param {{MaterialID?:number,Name?:string,MaterialType?:string,OnHand?:number,NeededByJobs?:number,QtyNeeded?:number,ToOrder?:number,UnitCost?:number,LineCost?:number,ProjectMaterialID?:number,StatusID?:number,Status?:string,Supplier?:string,OrderDate?:string,DeliveryDate?:string,Shortfall?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
MaterialID;
/** @type {string} */
Name;
/** @type {string} */
MaterialType;
/** @type {number} */
OnHand;
/** @type {number} */
NeededByJobs;
/** @type {number} */
QtyNeeded;
/** @type {number} */
ToOrder;
/** @type {number} */
UnitCost;
/** @type {number} */
LineCost;
/** @type {number} */
ProjectMaterialID;
/** @type {number} */
StatusID;
/** @type {string} */
Status;
/** @type {string} */
Supplier;
/** @type {string} */
OrderDate;
/** @type {string} */
DeliveryDate;
/** @type {boolean} */
Shortfall;
}
export class PmCalendarBar {
/** @param {{JobID?:number,Name?:string,StartDate?:string,EndDate?:string,Status?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
JobID;
/** @type {string} */
Name;
/** @type {string} */
StartDate;
/** @type {string} */
EndDate;
/** @type {string} */
Status;
}
export class PmCatalogItem {
/** @param {{Id?:number,Name?:string,Amount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
/** @type {number} */
Amount;
}
export class PmProjectDetail {
/** @param {{ProjectID?:number,ProjectUID?:string,Name?:string,Client?:string,ProjectType?:string,Status?:string,Branch?:string,StartDate?:string,EndDate?:string,Description?:string,Finance?:PmFinance,Readiness?:PmReadiness,Jobs?:PmJob[],Equipment?:PmEquipmentRow[],Materials?:PmMaterialRow[],Calendar?:PmCalendarBar[],ProjectStatuses?:PmCatalogItem[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {string} */
ProjectUID;
/** @type {string} */
Name;
/** @type {string} */
Client;
/** @type {string} */
ProjectType;
/** @type {string} */
Status;
/** @type {string} */
Branch;
/** @type {string} */
StartDate;
/** @type {string} */
EndDate;
/** @type {string} */
Description;
/** @type {PmFinance} */
Finance;
/** @type {PmReadiness} */
Readiness;
/** @type {PmJob[]} */
Jobs = [];
/** @type {PmEquipmentRow[]} */
Equipment = [];
/** @type {PmMaterialRow[]} */
Materials = [];
/** @type {PmCalendarBar[]} */
Calendar = [];
/** @type {PmCatalogItem[]} */
ProjectStatuses = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class PmProjectDetailRequest {
/** @param {{Uid?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Uid;
}
JavaScript PmProjectDetailRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/project/{Uid} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ProjectID":0,"ProjectUID":"String","Name":"String","Client":"String","ProjectType":"String","Status":"String","Branch":"String","StartDate":"String","EndDate":"String","Description":"String","Finance":{"Budget":0,"Spent":0,"EstimatedCost":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Variance":0,"HealthPct":0,"SpentPct":0,"ProgressPct":0},"Readiness":{"JobsNoCrew":0,"OpenRoles":0,"EquipmentConflicts":0,"MaterialGaps":0,"TotalGaps":0,"ReadyPct":0},"Jobs":[{"JobID":0,"Name":"String","Description":"String","Status":"String","StartDate":"String","EndDate":"String","CrewCount":0,"BudgetedHours":0,"EquipmentCount":0,"MaterialCount":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Cost":0,"NoCrew":false,"EquipConflict":false,"MaterialGap":false,"ReadyPct":0,"Crew":[{"ContactID":0,"Name":"String","Rate":0,"BudgetedHours":0,"IsOpen":false}],"Equipment":[{"Id":0,"Name":"String","Amount":0,"Qty":0}],"Materials":[{"Id":0,"Name":"String","Amount":0,"Qty":0}]}],"Equipment":[{"EquipmentID":0,"Name":"String","EquipmentType":"String","SerialNumber":"String","UsedByJobs":"String","Available":false,"Conflicts":[{"ProjectName":"String","JobName":"String","StartDate":"String","EndDate":"String"}],"MaintenanceIntervalDays":0,"LastServiceDate":"String","NextServiceDate":"String","MaintenanceState":"String"}],"Materials":[{"MaterialID":0,"Name":"String","MaterialType":"String","OnHand":0,"NeededByJobs":0,"QtyNeeded":0,"ToOrder":0,"UnitCost":0,"LineCost":0,"ProjectMaterialID":0,"StatusID":0,"Status":"String","Supplier":"String","OrderDate":"String","DeliveryDate":"String","Shortfall":false}],"Calendar":[{"JobID":0,"Name":"String","StartDate":"String","EndDate":"String","Status":"String"}],"ProjectStatuses":[{"Id":0,"Name":"String","Amount":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}