| GET,OPTIONS | /v1/safety/compliance |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class SafetyComplianceRequest
{
public Integer Days = null;
public Integer getDays() { return Days; }
public SafetyComplianceRequest setDays(Integer value) { this.Days = value; return this; }
}
public static class SafetyComplianceResponse
{
public ResponseStatus ResponseStatus = null;
public SafetyComplianceKpis Kpis = null;
public ArrayList<SafetyComplianceProject> Projects = new ArrayList<SafetyComplianceProject>();
public ArrayList<SafetyTrendWeek> Trend = new ArrayList<SafetyTrendWeek>();
public ArrayList<SafetyIncidentMixRow> IncidentMix = new ArrayList<SafetyIncidentMixRow>();
public ArrayList<SafetyMissingTalk> MissingTalks = new ArrayList<SafetyMissingTalk>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public SafetyComplianceResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public SafetyComplianceKpis getKpis() { return Kpis; }
public SafetyComplianceResponse setKpis(SafetyComplianceKpis value) { this.Kpis = value; return this; }
public ArrayList<SafetyComplianceProject> getProjects() { return Projects; }
public SafetyComplianceResponse setProjects(ArrayList<SafetyComplianceProject> value) { this.Projects = value; return this; }
public ArrayList<SafetyTrendWeek> getTrend() { return Trend; }
public SafetyComplianceResponse setTrend(ArrayList<SafetyTrendWeek> value) { this.Trend = value; return this; }
public ArrayList<SafetyIncidentMixRow> getIncidentMix() { return IncidentMix; }
public SafetyComplianceResponse setIncidentMix(ArrayList<SafetyIncidentMixRow> value) { this.IncidentMix = value; return this; }
public ArrayList<SafetyMissingTalk> getMissingTalks() { return MissingTalks; }
public SafetyComplianceResponse setMissingTalks(ArrayList<SafetyMissingTalk> value) { this.MissingTalks = value; return this; }
}
public static class SafetyComplianceKpis
{
public Integer ParticipationPct = null;
public Integer OpenIncidents = null;
public Integer OverdueCAs = null;
public Integer Recordables12mo = null;
public Integer DaysWithoutRecordable = null;
public Integer ProjectsWithTalkToday = null;
public Integer ProjectsWithCrewToday = null;
public Integer getParticipationPct() { return ParticipationPct; }
public SafetyComplianceKpis setParticipationPct(Integer value) { this.ParticipationPct = value; return this; }
public Integer getOpenIncidents() { return OpenIncidents; }
public SafetyComplianceKpis setOpenIncidents(Integer value) { this.OpenIncidents = value; return this; }
public Integer getOverdueCAs() { return OverdueCAs; }
public SafetyComplianceKpis setOverdueCAs(Integer value) { this.OverdueCAs = value; return this; }
public Integer getRecordables12mo() { return Recordables12mo; }
public SafetyComplianceKpis setRecordables12mo(Integer value) { this.Recordables12mo = value; return this; }
public Integer getDaysWithoutRecordable() { return DaysWithoutRecordable; }
public SafetyComplianceKpis setDaysWithoutRecordable(Integer value) { this.DaysWithoutRecordable = value; return this; }
public Integer getProjectsWithTalkToday() { return ProjectsWithTalkToday; }
public SafetyComplianceKpis setProjectsWithTalkToday(Integer value) { this.ProjectsWithTalkToday = value; return this; }
public Integer getProjectsWithCrewToday() { return ProjectsWithCrewToday; }
public SafetyComplianceKpis setProjectsWithCrewToday(Integer value) { this.ProjectsWithCrewToday = value; return this; }
}
public static class SafetyComplianceProject
{
public Integer ProjectID = null;
public String ProjectUID = null;
public String ProjectName = null;
public String Branch = null;
public Integer CrewCount = null;
public Boolean HasTalkToday = null;
public Integer TalkAckPct = null;
public Integer OpenIncidents = null;
public Integer OverdueCAs = null;
public Integer Recordables12mo = null;
public Integer getProjectID() { return ProjectID; }
public SafetyComplianceProject setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectUID() { return ProjectUID; }
public SafetyComplianceProject setProjectUID(String value) { this.ProjectUID = value; return this; }
public String getProjectName() { return ProjectName; }
public SafetyComplianceProject setProjectName(String value) { this.ProjectName = value; return this; }
public String getBranch() { return Branch; }
public SafetyComplianceProject setBranch(String value) { this.Branch = value; return this; }
public Integer getCrewCount() { return CrewCount; }
public SafetyComplianceProject setCrewCount(Integer value) { this.CrewCount = value; return this; }
public Boolean isHasTalkToday() { return HasTalkToday; }
public SafetyComplianceProject setHasTalkToday(Boolean value) { this.HasTalkToday = value; return this; }
public Integer getTalkAckPct() { return TalkAckPct; }
public SafetyComplianceProject setTalkAckPct(Integer value) { this.TalkAckPct = value; return this; }
public Integer getOpenIncidents() { return OpenIncidents; }
public SafetyComplianceProject setOpenIncidents(Integer value) { this.OpenIncidents = value; return this; }
public Integer getOverdueCAs() { return OverdueCAs; }
public SafetyComplianceProject setOverdueCAs(Integer value) { this.OverdueCAs = value; return this; }
public Integer getRecordables12mo() { return Recordables12mo; }
public SafetyComplianceProject setRecordables12mo(Integer value) { this.Recordables12mo = value; return this; }
}
public static class SafetyTrendWeek
{
public String WeekStart = null;
public Integer Acks = null;
public Integer Roster = null;
public String getWeekStart() { return WeekStart; }
public SafetyTrendWeek setWeekStart(String value) { this.WeekStart = value; return this; }
public Integer getAcks() { return Acks; }
public SafetyTrendWeek setAcks(Integer value) { this.Acks = value; return this; }
public Integer getRoster() { return Roster; }
public SafetyTrendWeek setRoster(Integer value) { this.Roster = value; return this; }
}
public static class SafetyIncidentMixRow
{
public String Severity = null;
public Integer Cnt = null;
public String getSeverity() { return Severity; }
public SafetyIncidentMixRow setSeverity(String value) { this.Severity = value; return this; }
public Integer getCnt() { return Cnt; }
public SafetyIncidentMixRow setCnt(Integer value) { this.Cnt = value; return this; }
}
public static class SafetyMissingTalk
{
public Integer ProjectID = null;
public String ProjectUID = null;
public String ProjectName = null;
public Integer CrewCount = null;
public Integer getProjectID() { return ProjectID; }
public SafetyMissingTalk setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectUID() { return ProjectUID; }
public SafetyMissingTalk setProjectUID(String value) { this.ProjectUID = value; return this; }
public String getProjectName() { return ProjectName; }
public SafetyMissingTalk setProjectName(String value) { this.ProjectName = value; return this; }
public Integer getCrewCount() { return CrewCount; }
public SafetyMissingTalk setCrewCount(Integer value) { this.CrewCount = value; return this; }
}
}
Java SafetyComplianceRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>