All Verbs | /health |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ASH.Services.HealthChecks.ServiceStack
Imports ASH.Services.HealthChecks.DTO
Imports ASH.Services.HealthChecks
Namespace Global
Namespace ASH.Services.HealthChecks
<Flags>
<DataContract>
Public Enum HealthStatus
Healthy = 0
Degraded = 4
Unhealthy = 8
End Enum
End Namespace
Namespace ASH.Services.HealthChecks.DTO
<DataContract>
Public Partial Class HealthReport
<DataMember>
Public Overridable Property Entries As IReadOnlyDictionary(Of String, HealthReportEntry)
<DataMember>
Public Overridable Property ApplicationStatus As HealthStatus
<DataMember>
Public Overridable Property Duration As TimeSpan
End Class
<DataContract>
Public Partial Class HealthReportEntry
<DataMember>
Public Overridable Property Status As HealthStatus
<DataMember>
Public Overridable Property Description As String
<DataMember>
Public Overridable Property Duration As TimeSpan
<DataMember>
Public Overridable Property Exception As Exception
<DataMember>
Public Overridable Property Data As IReadOnlyDictionary(Of String, Object)
End Class
End Namespace
Namespace ASH.Services.HealthChecks.ServiceStack
Public Partial Class HealthCheckRequest
End Class
End Namespace
End Namespace
VB.NET HealthCheckRequest 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.
POST /health HTTP/1.1
Host: resourcelibrary.api.ashcompanies.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"entries":null,"applicationStatus":"Healthy","duration":"PT0S"}