| GET,OPTIONS | /v1/safety/incidents |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class SafetyIncidentListRequest
{
public Date FromDate = null;
public Date ToDate = null;
public Integer ProjectID = null;
public Date getFromDate() { return FromDate; }
public SafetyIncidentListRequest setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public SafetyIncidentListRequest setToDate(Date value) { this.ToDate = value; return this; }
public Integer getProjectID() { return ProjectID; }
public SafetyIncidentListRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
}
public static class SafetyIncidentListResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<SafetyIncident> Incidents = new ArrayList<SafetyIncident>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public SafetyIncidentListResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<SafetyIncident> getIncidents() { return Incidents; }
public SafetyIncidentListResponse setIncidents(ArrayList<SafetyIncident> value) { this.Incidents = value; return this; }
}
public static class SafetyIncident
{
public Integer SafetyIncidentID = null;
public UUID SafetyIncidentUID = null;
public UUID BranchId = null;
public Integer ProjectID = null;
public String IncidentNo = null;
public String IncidentType = null;
public String Severity = null;
public String Status = null;
public String Title = null;
public String Location = null;
public String CrewLabel = null;
public String Description = null;
public String ReportedBy = null;
public Boolean IsRecordable = null;
public Date OccurredAt = null;
public Date ClosedAt = null;
public String SourceRef = null;
public String CreatedBy = null;
public Date CreatedAt = null;
public Date UpdatedAt = null;
public Integer DaysAgo = null;
public Integer getSafetyIncidentID() { return SafetyIncidentID; }
public SafetyIncident setSafetyIncidentID(Integer value) { this.SafetyIncidentID = value; return this; }
public UUID getSafetyIncidentUID() { return SafetyIncidentUID; }
public SafetyIncident setSafetyIncidentUID(UUID value) { this.SafetyIncidentUID = value; return this; }
public UUID getBranchId() { return BranchId; }
public SafetyIncident setBranchId(UUID value) { this.BranchId = value; return this; }
public Integer getProjectID() { return ProjectID; }
public SafetyIncident setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getIncidentNo() { return IncidentNo; }
public SafetyIncident setIncidentNo(String value) { this.IncidentNo = value; return this; }
public String getIncidentType() { return IncidentType; }
public SafetyIncident setIncidentType(String value) { this.IncidentType = value; return this; }
public String getSeverity() { return Severity; }
public SafetyIncident setSeverity(String value) { this.Severity = value; return this; }
public String getStatus() { return Status; }
public SafetyIncident setStatus(String value) { this.Status = value; return this; }
public String getTitle() { return Title; }
public SafetyIncident setTitle(String value) { this.Title = value; return this; }
public String getLocation() { return Location; }
public SafetyIncident setLocation(String value) { this.Location = value; return this; }
public String getCrewLabel() { return CrewLabel; }
public SafetyIncident setCrewLabel(String value) { this.CrewLabel = value; return this; }
public String getDescription() { return Description; }
public SafetyIncident setDescription(String value) { this.Description = value; return this; }
public String getReportedBy() { return ReportedBy; }
public SafetyIncident setReportedBy(String value) { this.ReportedBy = value; return this; }
public Boolean getIsRecordable() { return IsRecordable; }
public SafetyIncident setIsRecordable(Boolean value) { this.IsRecordable = value; return this; }
public Date getOccurredAt() { return OccurredAt; }
public SafetyIncident setOccurredAt(Date value) { this.OccurredAt = value; return this; }
public Date getClosedAt() { return ClosedAt; }
public SafetyIncident setClosedAt(Date value) { this.ClosedAt = value; return this; }
public String getSourceRef() { return SourceRef; }
public SafetyIncident setSourceRef(String value) { this.SourceRef = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public SafetyIncident setCreatedBy(String value) { this.CreatedBy = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public SafetyIncident setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public SafetyIncident setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
public Integer getDaysAgo() { return DaysAgo; }
public SafetyIncident setDaysAgo(Integer value) { this.DaysAgo = value; return this; }
}
}
Java SafetyIncidentListRequest 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/incidents 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"}},"Incidents":[{"SafetyIncidentID":0,"SafetyIncidentUID":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","ProjectID":0,"IncidentNo":"String","IncidentType":"String","Severity":"String","Status":"String","Title":"String","Location":"String","CrewLabel":"String","Description":"String","ReportedBy":"String","IsRecordable":false,"OccurredAt":"0001-01-01T00:00:00.0000000","ClosedAt":"0001-01-01T00:00:00.0000000","SourceRef":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","DaysAgo":0}]}