| GET,OPTIONS | /v1/safety/incidents/{SafetyIncidentID} |
|---|
import Foundation
import ServiceStack
public class SafetyIncidentDetailRequest : Codable
{
public var safetyIncidentID:Int
required public init(){}
}
public class SafetyIncidentResponse : Codable
{
public var responseStatus:ResponseStatus
public var incident: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 SafetyIncidentDetailRequest 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/{SafetyIncidentID} 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"}},"Incident":{"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}}