Trendsic Platform Service

<back to all web services

SafetyComplianceRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/safety/compliance
namespace CRM.AgencyPlatform.API.Internal

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type SafetyComplianceKpis() = 
        member val ParticipationPct:Int32 = new Int32() with get,set
        member val OpenIncidents:Int32 = new Int32() with get,set
        member val OverdueCAs:Int32 = new Int32() with get,set
        member val Recordables12mo:Int32 = new Int32() with get,set
        member val DaysWithoutRecordable:Int32 = new Int32() with get,set
        member val ProjectsWithTalkToday:Int32 = new Int32() with get,set
        member val ProjectsWithCrewToday:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SafetyComplianceProject() = 
        member val ProjectID:Int32 = new Int32() with get,set
        member val ProjectUID:String = null with get,set
        member val ProjectName:String = null with get,set
        member val Branch:String = null with get,set
        member val CrewCount:Int32 = new Int32() with get,set
        member val HasTalkToday:Boolean = new Boolean() with get,set
        member val TalkAckPct:Int32 = new Int32() with get,set
        member val OpenIncidents:Int32 = new Int32() with get,set
        member val OverdueCAs:Int32 = new Int32() with get,set
        member val Recordables12mo:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SafetyTrendWeek() = 
        member val WeekStart:String = null with get,set
        member val Acks:Int32 = new Int32() with get,set
        member val Roster:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SafetyIncidentMixRow() = 
        member val Severity:String = null with get,set
        member val Cnt:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SafetyMissingTalk() = 
        member val ProjectID:Int32 = new Int32() with get,set
        member val ProjectUID:String = null with get,set
        member val ProjectName:String = null with get,set
        member val CrewCount:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SafetyComplianceResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val Kpis:SafetyComplianceKpis = null with get,set
        member val Projects:ResizeArray<SafetyComplianceProject> = new ResizeArray<SafetyComplianceProject>() with get,set
        member val Trend:ResizeArray<SafetyTrendWeek> = new ResizeArray<SafetyTrendWeek>() with get,set
        member val IncidentMix:ResizeArray<SafetyIncidentMixRow> = new ResizeArray<SafetyIncidentMixRow>() with get,set
        member val MissingTalks:ResizeArray<SafetyMissingTalk> = new ResizeArray<SafetyMissingTalk>() with get,set

    [<AllowNullLiteral>]
    type SafetyComplianceRequest() = 
        member val Days:Int32 = new Int32() with get,set

F# 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

HTTP + JSON

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}]}