Trendsic Platform Service

<back to all web services

SafetyIncidentUpdateRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/safety/incidents/{SafetyIncidentID}
import Foundation
import ServiceStack

public class SafetyIncidentUpdateRequest : Codable
{
    public var safetyIncidentID:Int
    public var incidentType:String
    public var severity: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?

    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 SafetyIncidentUpdateRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/safety/incidents/{SafetyIncidentID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SafetyIncidentID: 0,
	IncidentType: String,
	Severity: String,
	Title: String,
	Location: String,
	CrewLabel: String,
	Description: String,
	ReportedBy: String,
	IsRecordable: False,
	OccurredAt: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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-01,
		ClosedAt: 0001-01-01,
		SourceRef: String,
		CreatedBy: String,
		CreatedAt: 0001-01-01,
		UpdatedAt: 0001-01-01,
		DaysAgo: 0
	}
}