GET | /status |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class HealthRequest implements IGet
{
}
public static class HealthResponse
{
public HealthCheckReport result = null;
public HealthCheckReport getResult() { return result; }
public HealthResponse setResult(HealthCheckReport value) { this.result = value; return this; }
}
public static class HealthCheckReport
{
public HealthStatus status = null;
public TimeSpan duration = null;
public String version = null;
public String buildDate = null;
public ArrayList<HealthCheckReportEntry> entries = null;
public HealthStatus getStatus() { return status; }
public HealthCheckReport setStatus(HealthStatus value) { this.status = value; return this; }
public TimeSpan getDuration() { return duration; }
public HealthCheckReport setDuration(TimeSpan value) { this.duration = value; return this; }
public String getVersion() { return version; }
public HealthCheckReport setVersion(String value) { this.version = value; return this; }
public String getBuildDate() { return buildDate; }
public HealthCheckReport setBuildDate(String value) { this.buildDate = value; return this; }
public ArrayList<HealthCheckReportEntry> getEntries() { return entries; }
public HealthCheckReport setEntries(ArrayList<HealthCheckReportEntry> value) { this.entries = value; return this; }
}
public static enum HealthStatus
{
Unhealthy,
Degraded,
Healthy;
}
public static class HealthCheckReportEntry
{
public String key = null;
public String description = null;
public TimeSpan duration = null;
public HealthStatus status = null;
public String error = null;
public String getKey() { return key; }
public HealthCheckReportEntry setKey(String value) { this.key = value; return this; }
public String getDescription() { return description; }
public HealthCheckReportEntry setDescription(String value) { this.description = value; return this; }
public TimeSpan getDuration() { return duration; }
public HealthCheckReportEntry setDuration(TimeSpan value) { this.duration = value; return this; }
public HealthStatus getStatus() { return status; }
public HealthCheckReportEntry setStatus(HealthStatus value) { this.status = value; return this; }
public String getError() { return error; }
public HealthCheckReportEntry setError(String value) { this.error = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"result":{"status":"Unhealthy","duration":"PT0S","version":"String","buildDate":"String"}}