| GET,OPTIONS | /v1/safety/incidents |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class SafetyIncident
Public Overridable Property SafetyIncidentID As Integer
Public Overridable Property SafetyIncidentUID As Guid
Public Overridable Property BranchId As Guid?
Public Overridable Property ProjectID As Integer?
Public Overridable Property IncidentNo As String
Public Overridable Property IncidentType As String
Public Overridable Property Severity As String
Public Overridable Property Status As String
Public Overridable Property Title As String
Public Overridable Property Location As String
Public Overridable Property CrewLabel As String
Public Overridable Property Description As String
Public Overridable Property ReportedBy As String
Public Overridable Property IsRecordable As Boolean
Public Overridable Property OccurredAt As Date?
Public Overridable Property ClosedAt As Date?
Public Overridable Property SourceRef As String
Public Overridable Property CreatedBy As String
Public Overridable Property CreatedAt As Date?
Public Overridable Property UpdatedAt As Date?
Public Overridable Property DaysAgo As Integer
End Class
Public Partial Class SafetyIncidentListRequest
Public Overridable Property FromDate As Date?
Public Overridable Property ToDate As Date?
Public Overridable Property ProjectID As Integer?
End Class
Public Partial Class SafetyIncidentListResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Incidents As List(Of SafetyIncident) = New List(Of SafetyIncident)
End Class
End Namespace
End Namespace
VB.NET SafetyIncidentListRequest 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 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"}},"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}]}