Trendsic Platform Service

<back to all web services

EngineHealthRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/engine/health
import 'package:servicestack/servicestack.dart';

class WorkflowThroughputView implements IConvertible
{
    int? Hour;
    int? Ok;
    int? Failed;

    WorkflowThroughputView({this.Hour,this.Ok,this.Failed});
    WorkflowThroughputView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Hour = json['Hour'];
        Ok = json['Ok'];
        Failed = json['Failed'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Hour': Hour,
        'Ok': Ok,
        'Failed': Failed
    };

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

class WorkflowVerticalHealthView implements IConvertible
{
    String? Vertical;
    int? Workflows;
    int? Runs30;
    int? Fail30;
    int? Waiting;

    WorkflowVerticalHealthView({this.Vertical,this.Workflows,this.Runs30,this.Fail30,this.Waiting});
    WorkflowVerticalHealthView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Vertical = json['Vertical'];
        Workflows = json['Workflows'];
        Runs30 = json['Runs30'];
        Fail30 = json['Fail30'];
        Waiting = json['Waiting'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Vertical': Vertical,
        'Workflows': Workflows,
        'Runs30': Runs30,
        'Fail30': Fail30,
        'Waiting': Waiting
    };

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

class EngineHealthResponse implements IConvertible
{
    int? Runs30;
    int? Succeeded30;
    int? Failed30;
    int? Waiting;
    int? OpenErrorGroups;
    int? AffectedRuns;
    int? SlaBreaches;
    List<WorkflowThroughputView>? Throughput = [];
    List<WorkflowVerticalHealthView>? ByVertical = [];
    ResponseStatus? ResponseStatus;

    EngineHealthResponse({this.Runs30,this.Succeeded30,this.Failed30,this.Waiting,this.OpenErrorGroups,this.AffectedRuns,this.SlaBreaches,this.Throughput,this.ByVertical,this.ResponseStatus});
    EngineHealthResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Runs30 = json['Runs30'];
        Succeeded30 = json['Succeeded30'];
        Failed30 = json['Failed30'];
        Waiting = json['Waiting'];
        OpenErrorGroups = json['OpenErrorGroups'];
        AffectedRuns = json['AffectedRuns'];
        SlaBreaches = json['SlaBreaches'];
        Throughput = JsonConverters.fromJson(json['Throughput'],'List<WorkflowThroughputView>',context!);
        ByVertical = JsonConverters.fromJson(json['ByVertical'],'List<WorkflowVerticalHealthView>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Runs30': Runs30,
        'Succeeded30': Succeeded30,
        'Failed30': Failed30,
        'Waiting': Waiting,
        'OpenErrorGroups': OpenErrorGroups,
        'AffectedRuns': AffectedRuns,
        'SlaBreaches': SlaBreaches,
        'Throughput': JsonConverters.toJson(Throughput,'List<WorkflowThroughputView>',context!),
        'ByVertical': JsonConverters.toJson(ByVertical,'List<WorkflowVerticalHealthView>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'WorkflowThroughputView': TypeInfo(TypeOf.Class, create:() => WorkflowThroughputView()),
    'WorkflowVerticalHealthView': TypeInfo(TypeOf.Class, create:() => WorkflowVerticalHealthView()),
    'EngineHealthResponse': TypeInfo(TypeOf.Class, create:() => EngineHealthResponse()),
    'List<WorkflowThroughputView>': TypeInfo(TypeOf.Class, create:() => <WorkflowThroughputView>[]),
    'List<WorkflowVerticalHealthView>': TypeInfo(TypeOf.Class, create:() => <WorkflowVerticalHealthView>[]),
    'EngineHealthRequest': TypeInfo(TypeOf.Class, create:() => EngineHealthRequest()),
});

Dart EngineHealthRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/engine/health HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EngineHealthResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AffectedRuns>0</AffectedRuns>
  <ByVertical>
    <WorkflowVerticalHealthView>
      <Fail30>0</Fail30>
      <Runs30>0</Runs30>
      <Vertical>String</Vertical>
      <Waiting>0</Waiting>
      <Workflows>0</Workflows>
    </WorkflowVerticalHealthView>
  </ByVertical>
  <Failed30>0</Failed30>
  <OpenErrorGroups>0</OpenErrorGroups>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Runs30>0</Runs30>
  <SlaBreaches>0</SlaBreaches>
  <Succeeded30>0</Succeeded30>
  <Throughput>
    <WorkflowThroughputView>
      <Failed>0</Failed>
      <Hour>0</Hour>
      <Ok>0</Ok>
    </WorkflowThroughputView>
  </Throughput>
  <Waiting>0</Waiting>
</EngineHealthResponse>