Trendsic Platform Service

<back to all web services

SafetyComplianceRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/safety/compliance
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class SafetyComplianceKpis
    {
        public virtual int ParticipationPct { get; set; }
        public virtual int OpenIncidents { get; set; }
        public virtual int OverdueCAs { get; set; }
        public virtual int Recordables12mo { get; set; }
        public virtual int DaysWithoutRecordable { get; set; }
        public virtual int ProjectsWithTalkToday { get; set; }
        public virtual int ProjectsWithCrewToday { get; set; }
    }

    public partial class SafetyComplianceProject
    {
        public virtual int ProjectID { get; set; }
        public virtual string ProjectUID { get; set; }
        public virtual string ProjectName { get; set; }
        public virtual string Branch { get; set; }
        public virtual int CrewCount { get; set; }
        public virtual bool HasTalkToday { get; set; }
        public virtual int TalkAckPct { get; set; }
        public virtual int OpenIncidents { get; set; }
        public virtual int OverdueCAs { get; set; }
        public virtual int Recordables12mo { get; set; }
    }

    public partial class SafetyComplianceRequest
    {
        public virtual int Days { get; set; }
    }

    public partial class SafetyComplianceResponse
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
        public virtual SafetyComplianceKpis Kpis { get; set; }
        public virtual List<SafetyComplianceProject> Projects { get; set; } = [];
        public virtual List<SafetyTrendWeek> Trend { get; set; } = [];
        public virtual List<SafetyIncidentMixRow> IncidentMix { get; set; } = [];
        public virtual List<SafetyMissingTalk> MissingTalks { get; set; } = [];
    }

    public partial class SafetyIncidentMixRow
    {
        public virtual string Severity { get; set; }
        public virtual int Cnt { get; set; }
    }

    public partial class SafetyMissingTalk
    {
        public virtual int ProjectID { get; set; }
        public virtual string ProjectUID { get; set; }
        public virtual string ProjectName { get; set; }
        public virtual int CrewCount { get; set; }
    }

    public partial class SafetyTrendWeek
    {
        public virtual string WeekStart { get; set; }
        public virtual int Acks { get; set; }
        public virtual int Roster { get; set; }
    }

}

C# SafetyComplianceRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>