| 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 .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Kpis:
{
ParticipationPct: 0,
OpenIncidents: 0,
OverdueCAs: 0,
Recordables12mo: 0,
DaysWithoutRecordable: 0,
ProjectsWithTalkToday: 0,
ProjectsWithCrewToday: 0
},
Projects:
[
{
ProjectID: 0,
ProjectUID: String,
ProjectName: String,
Branch: String,
CrewCount: 0,
HasTalkToday: False,
TalkAckPct: 0,
OpenIncidents: 0,
OverdueCAs: 0,
Recordables12mo: 0
}
],
Trend:
[
{
WeekStart: String,
Acks: 0,
Roster: 0
}
],
IncidentMix:
[
{
Severity: String,
Cnt: 0
}
],
MissingTalks:
[
{
ProjectID: 0,
ProjectUID: String,
ProjectName: String,
CrewCount: 0
}
]
}