| GET,OPTIONS | /v1/safety/incidents |
|---|
import Foundation
import ServiceStack
public class SafetyIncidentListRequest : Codable
{
public var fromDate:Date?
public var toDate:Date?
public var projectID:Int?
required public init(){}
}
public class SafetyIncidentListResponse : Codable
{
public var responseStatus:ResponseStatus
public var incidents:[SafetyIncident] = []
required public init(){}
}
public class SafetyIncident : Codable
{
public var safetyIncidentID:Int
public var safetyIncidentUID:String
public var branchId:String?
public var projectID:Int?
public var incidentNo:String
public var incidentType:String
public var severity:String
public var status:String
public var title:String
public var location:String
public var crewLabel:String
public var Description:String
public var reportedBy:String
public var isRecordable:Bool
public var occurredAt:Date?
public var closedAt:Date?
public var sourceRef:String
public var createdBy:String
public var createdAt:Date?
public var updatedAt:Date?
public var daysAgo:Int
required public init(){}
}
Swift SafetyIncidentListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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}]}