Mercedes.VehicleManagement.API

<back to all web services

HealthRequest

The following routes are available for this service:
GET/status
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Mercedes.SS.Plugins.HealthCheck.ServiceModel
Imports Mercedes.SS.Plugins.HealthCheck.ServiceModel.Types
Imports Microsoft.Extensions.Diagnostics.HealthChecks

Namespace Global

    Namespace Mercedes.SS.Plugins.HealthCheck.ServiceModel

        Public Partial Class HealthRequest
            Implements IGet
        End Class

        Public Partial Class HealthResponse
            Public Overridable Property Result As HealthCheckReport
        End Class
    End Namespace

    Namespace Mercedes.SS.Plugins.HealthCheck.ServiceModel.Types

        Public Partial Class HealthCheckReport
            Public Overridable Property Status As HealthStatus
            Public Overridable Property Duration As TimeSpan
            Public Overridable Property Version As String
            Public Overridable Property BuildDate As String
            Public Overridable Property Entries As ICollection(Of HealthCheckReportEntry)
        End Class

        Public Partial Class HealthCheckReportEntry
            Public Overridable Property Key As String
            Public Overridable Property Description As String
            Public Overridable Property Duration As TimeSpan
            Public Overridable Property Status As HealthStatus
            Public Overridable Property [Error] As String
        End Class
    End Namespace

    Namespace Microsoft.Extensions.Diagnostics.HealthChecks

        Public Enum HealthStatus
            Unhealthy
            Degraded
            Healthy
        End Enum
    End Namespace
End Namespace

VB.NET HealthRequest 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.

GET /status HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	result: 
	{
		status: Unhealthy,
		duration: PT0S,
		version: String,
		buildDate: String
	}
}