| GET,OPTIONS | /v1/safety/compliance |
|---|
"use strict";
export class SafetyComplianceKpis {
/** @param {{ParticipationPct?:number,OpenIncidents?:number,OverdueCAs?:number,Recordables12mo?:number,DaysWithoutRecordable?:number,ProjectsWithTalkToday?:number,ProjectsWithCrewToday?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ParticipationPct;
/** @type {number} */
OpenIncidents;
/** @type {number} */
OverdueCAs;
/** @type {number} */
Recordables12mo;
/** @type {number} */
DaysWithoutRecordable;
/** @type {number} */
ProjectsWithTalkToday;
/** @type {number} */
ProjectsWithCrewToday;
}
export class SafetyComplianceProject {
/** @param {{ProjectID?:number,ProjectUID?:string,ProjectName?:string,Branch?:string,CrewCount?:number,HasTalkToday?:boolean,TalkAckPct?:number,OpenIncidents?:number,OverdueCAs?:number,Recordables12mo?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {string} */
ProjectUID;
/** @type {string} */
ProjectName;
/** @type {string} */
Branch;
/** @type {number} */
CrewCount;
/** @type {boolean} */
HasTalkToday;
/** @type {number} */
TalkAckPct;
/** @type {number} */
OpenIncidents;
/** @type {number} */
OverdueCAs;
/** @type {number} */
Recordables12mo;
}
export class SafetyTrendWeek {
/** @param {{WeekStart?:string,Acks?:number,Roster?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
WeekStart;
/** @type {number} */
Acks;
/** @type {number} */
Roster;
}
export class SafetyIncidentMixRow {
/** @param {{Severity?:string,Cnt?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Severity;
/** @type {number} */
Cnt;
}
export class SafetyMissingTalk {
/** @param {{ProjectID?:number,ProjectUID?:string,ProjectName?:string,CrewCount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {string} */
ProjectUID;
/** @type {string} */
ProjectName;
/** @type {number} */
CrewCount;
}
export class SafetyComplianceResponse {
/** @param {{ResponseStatus?:ResponseStatus,Kpis?:SafetyComplianceKpis,Projects?:SafetyComplianceProject[],Trend?:SafetyTrendWeek[],IncidentMix?:SafetyIncidentMixRow[],MissingTalks?:SafetyMissingTalk[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {SafetyComplianceKpis} */
Kpis;
/** @type {SafetyComplianceProject[]} */
Projects = [];
/** @type {SafetyTrendWeek[]} */
Trend = [];
/** @type {SafetyIncidentMixRow[]} */
IncidentMix = [];
/** @type {SafetyMissingTalk[]} */
MissingTalks = [];
}
export class SafetyComplianceRequest {
/** @param {{Days?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Days;
}
JavaScript SafetyComplianceRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/safety/compliance HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SafetyComplianceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<IncidentMix>
<SafetyIncidentMixRow>
<Cnt>0</Cnt>
<Severity>String</Severity>
</SafetyIncidentMixRow>
</IncidentMix>
<Kpis>
<DaysWithoutRecordable>0</DaysWithoutRecordable>
<OpenIncidents>0</OpenIncidents>
<OverdueCAs>0</OverdueCAs>
<ParticipationPct>0</ParticipationPct>
<ProjectsWithCrewToday>0</ProjectsWithCrewToday>
<ProjectsWithTalkToday>0</ProjectsWithTalkToday>
<Recordables12mo>0</Recordables12mo>
</Kpis>
<MissingTalks>
<SafetyMissingTalk>
<CrewCount>0</CrewCount>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<ProjectUID>String</ProjectUID>
</SafetyMissingTalk>
</MissingTalks>
<Projects>
<SafetyComplianceProject>
<Branch>String</Branch>
<CrewCount>0</CrewCount>
<HasTalkToday>false</HasTalkToday>
<OpenIncidents>0</OpenIncidents>
<OverdueCAs>0</OverdueCAs>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<ProjectUID>String</ProjectUID>
<Recordables12mo>0</Recordables12mo>
<TalkAckPct>0</TalkAckPct>
</SafetyComplianceProject>
</Projects>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Trend>
<SafetyTrendWeek>
<Acks>0</Acks>
<Roster>0</Roster>
<WeekStart>String</WeekStart>
</SafetyTrendWeek>
</Trend>
</SafetyComplianceResponse>