| GET,OPTIONS | /v1/safety/compliance |
|---|
import Foundation
import ServiceStack
public class SafetyComplianceRequest : Codable
{
public var days:Int
required public init(){}
}
public class SafetyComplianceResponse : Codable
{
public var responseStatus:ResponseStatus
public var kpis:SafetyComplianceKpis
public var projects:[SafetyComplianceProject] = []
public var trend:[SafetyTrendWeek] = []
public var incidentMix:[SafetyIncidentMixRow] = []
public var missingTalks:[SafetyMissingTalk] = []
required public init(){}
}
public class SafetyComplianceKpis : Codable
{
public var participationPct:Int
public var openIncidents:Int
public var overdueCAs:Int
public var recordables12mo:Int
public var daysWithoutRecordable:Int
public var projectsWithTalkToday:Int
public var projectsWithCrewToday:Int
required public init(){}
}
public class SafetyComplianceProject : Codable
{
public var projectID:Int
public var projectUID:String
public var projectName:String
public var branch:String
public var crewCount:Int
public var hasTalkToday:Bool
public var talkAckPct:Int
public var openIncidents:Int
public var overdueCAs:Int
public var recordables12mo:Int
required public init(){}
}
public class SafetyTrendWeek : Codable
{
public var weekStart:String
public var acks:Int
public var roster:Int
required public init(){}
}
public class SafetyIncidentMixRow : Codable
{
public var severity:String
public var cnt:Int
required public init(){}
}
public class SafetyMissingTalk : Codable
{
public var projectID:Int
public var projectUID:String
public var projectName:String
public var crewCount:Int
required public init(){}
}
Swift SafetyComplianceRequest 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/safety/compliance HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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}]}