Trendsic Platform Service

<back to all web services

SafetyComplianceRequest

Requires Authentication
The following routes are available for this service:
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 .other suffix or ?format=other

HTTP + OTHER

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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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}]}