| GET,OPTIONS | /v1/safety/incidents/{SafetyIncidentID} |
|---|
namespace CRM.AgencyPlatform.API.Internal
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type SafetyIncident() =
member val SafetyIncidentID:Int32 = new Int32() with get,set
member val SafetyIncidentUID:Guid = new Guid() with get,set
member val BranchId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val ProjectID:Nullable<Int32> = new Nullable<Int32>() with get,set
member val IncidentNo:String = null with get,set
member val IncidentType:String = null with get,set
member val Severity:String = null with get,set
member val Status:String = null with get,set
member val Title:String = null with get,set
member val Location:String = null with get,set
member val CrewLabel:String = null with get,set
member val Description:String = null with get,set
member val ReportedBy:String = null with get,set
member val IsRecordable:Boolean = new Boolean() with get,set
member val OccurredAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val ClosedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val SourceRef:String = null with get,set
member val CreatedBy:String = null with get,set
member val CreatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val UpdatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val DaysAgo:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type SafetyIncidentResponse() =
member val ResponseStatus:ResponseStatus = null with get,set
member val Incident:SafetyIncident = null with get,set
[<AllowNullLiteral>]
type SafetyIncidentDetailRequest() =
member val SafetyIncidentID:Int32 = new Int32() with get,set
F# SafetyIncidentDetailRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
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
}
}