| GET,OPTIONS | /v1/safety/compliance |
|---|
export class SafetyComplianceKpis
{
public ParticipationPct: number;
public OpenIncidents: number;
public OverdueCAs: number;
public Recordables12mo: number;
public DaysWithoutRecordable: number;
public ProjectsWithTalkToday: number;
public ProjectsWithCrewToday: number;
public constructor(init?: Partial<SafetyComplianceKpis>) { (Object as any).assign(this, init); }
}
export class SafetyComplianceProject
{
public ProjectID: number;
public ProjectUID: string;
public ProjectName: string;
public Branch: string;
public CrewCount: number;
public HasTalkToday: boolean;
public TalkAckPct: number;
public OpenIncidents: number;
public OverdueCAs: number;
public Recordables12mo: number;
public constructor(init?: Partial<SafetyComplianceProject>) { (Object as any).assign(this, init); }
}
export class SafetyTrendWeek
{
public WeekStart: string;
public Acks: number;
public Roster: number;
public constructor(init?: Partial<SafetyTrendWeek>) { (Object as any).assign(this, init); }
}
export class SafetyIncidentMixRow
{
public Severity: string;
public Cnt: number;
public constructor(init?: Partial<SafetyIncidentMixRow>) { (Object as any).assign(this, init); }
}
export class SafetyMissingTalk
{
public ProjectID: number;
public ProjectUID: string;
public ProjectName: string;
public CrewCount: number;
public constructor(init?: Partial<SafetyMissingTalk>) { (Object as any).assign(this, init); }
}
export class SafetyComplianceResponse
{
public ResponseStatus: ResponseStatus;
public Kpis: SafetyComplianceKpis;
public Projects: SafetyComplianceProject[] = [];
public Trend: SafetyTrendWeek[] = [];
public IncidentMix: SafetyIncidentMixRow[] = [];
public MissingTalks: SafetyMissingTalk[] = [];
public constructor(init?: Partial<SafetyComplianceResponse>) { (Object as any).assign(this, init); }
}
export class SafetyComplianceRequest
{
public Days: number;
public constructor(init?: Partial<SafetyComplianceRequest>) { (Object as any).assign(this, init); }
}
TypeScript 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>