Trendsic Platform Service

<back to all web services

SafetyIncidentCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/safety/incidents
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 SafetyIncidentCreateRequest() = 
        member val IncidentType:String = null with get,set
        member val Severity: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 ProjectID:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val SourceRef:String = null with get,set

F# SafetyIncidentCreateRequest DTOs

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

HTTP + OTHER

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

POST /v1/safety/incidents HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"IncidentType":"String","Severity":"String","Title":"String","Location":"String","CrewLabel":"String","Description":"String","ReportedBy":"String","IsRecordable":false,"OccurredAt":"0001-01-01T00:00:00.0000000","ProjectID":0,"SourceRef":"String"}
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"}},"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}}