ConsumerApi

<back to all web services

StatusRequest

ConsumerBusinessBackoffice
The following routes are available for this service:
GET/statusVerify that the service runs correctly.The reply itself is a verification of success, and causes a warmup, furthermore contact with database and other required services is checked.

library ConsumerApi;
import 'package:servicestack/servicestack.dart';

class StatusResponse implements IConvertible
{
    bool? databaseConnectionOk;
    bool? searchConnectionOk;
    String? deployedVersion;
    DateTime? deployedAt;

    StatusResponse({this.databaseConnectionOk,this.searchConnectionOk,this.deployedVersion,this.deployedAt});
    StatusResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        databaseConnectionOk = json['databaseConnectionOk'];
        searchConnectionOk = json['searchConnectionOk'];
        deployedVersion = json['deployedVersion'];
        deployedAt = JsonConverters.fromJson(json['deployedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'databaseConnectionOk': databaseConnectionOk,
        'searchConnectionOk': searchConnectionOk,
        'deployedVersion': deployedVersion,
        'deployedAt': JsonConverters.toJson(deployedAt,'DateTime',context!)
    };

    getTypeName() => "StatusResponse";
    TypeContext? context = _ctx;
}

class StatusRequest implements IGet, IConvertible
{
    StatusRequest();
    StatusRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "StatusRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: <String, TypeInfo> {
    'StatusResponse': TypeInfo(TypeOf.Class, create:() => StatusResponse()),
    'StatusRequest': TypeInfo(TypeOf.Class, create:() => StatusRequest()),
});

Dart StatusRequest 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.

GET /status HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"databaseConnectionOk":false,"searchConnectionOk":false,"deployedVersion":"String","deployedAt":"0001-01-01T00:00:00.0000000+00:00"}