Trendsic Platform Service

<back to all web services

EngineSuggestionsRequest

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

class WorkflowSuggestionView implements IConvertible
{
    int? SuggestionId;
    String? SuggestionKey;
    String? Title;
    String? Evidence;
    String? Impact;
    String? Vertical;

    WorkflowSuggestionView({this.SuggestionId,this.SuggestionKey,this.Title,this.Evidence,this.Impact,this.Vertical});
    WorkflowSuggestionView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SuggestionId = json['SuggestionId'];
        SuggestionKey = json['SuggestionKey'];
        Title = json['Title'];
        Evidence = json['Evidence'];
        Impact = json['Impact'];
        Vertical = json['Vertical'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SuggestionId': SuggestionId,
        'SuggestionKey': SuggestionKey,
        'Title': Title,
        'Evidence': Evidence,
        'Impact': Impact,
        'Vertical': Vertical
    };

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

class EngineSuggestionsResponse implements IConvertible
{
    List<WorkflowSuggestionView>? Suggestions = [];
    ResponseStatus? ResponseStatus;

    EngineSuggestionsResponse({this.Suggestions,this.ResponseStatus});
    EngineSuggestionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Suggestions = JsonConverters.fromJson(json['Suggestions'],'List<WorkflowSuggestionView>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Suggestions': JsonConverters.toJson(Suggestions,'List<WorkflowSuggestionView>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

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

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

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

Dart EngineSuggestionsRequest DTOs

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

HTTP + CSV

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

GET /v1/engine/suggestions HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Suggestions":[{"SuggestionId":0,"SuggestionKey":"String","Title":"String","Evidence":"String","Impact":"String","Vertical":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}