Trendsic Platform Service

<back to all web services

FormAutomationSandboxRequest

Requires Authentication
The following routes are available for this service:
POST/v1/forms/{FormUID}/automations/{WorkflowId}/sandbox
import 'package:servicestack/servicestack.dart';

class FormSandboxLine implements IConvertible
{
    String? Tone;
    String? Mark;
    String? Text;

    FormSandboxLine({this.Tone,this.Mark,this.Text});
    FormSandboxLine.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Tone = json['Tone'];
        Mark = json['Mark'];
        Text = json['Text'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Tone': Tone,
        'Mark': Mark,
        'Text': Text
    };

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

class FormAutomationSandboxResponse implements IConvertible
{
    int? WorkflowId;
    String? Rule;
    List<FormSandboxLine>? Log = [];
    ResponseStatus? ResponseStatus;

    FormAutomationSandboxResponse({this.WorkflowId,this.Rule,this.Log,this.ResponseStatus});
    FormAutomationSandboxResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'WorkflowId': WorkflowId,
        'Rule': Rule,
        'Log': JsonConverters.toJson(Log,'List<FormSandboxLine>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class FormAutomationSandboxRequest implements IConvertible
{
    String? FormUID;
    int? WorkflowId;
    String? SubmissionUID;

    FormAutomationSandboxRequest({this.FormUID,this.WorkflowId,this.SubmissionUID});
    FormAutomationSandboxRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FormUID = json['FormUID'];
        WorkflowId = json['WorkflowId'];
        SubmissionUID = json['SubmissionUID'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FormUID': FormUID,
        'WorkflowId': WorkflowId,
        'SubmissionUID': SubmissionUID
    };

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

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

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

POST /v1/forms/{FormUID}/automations/{WorkflowId}/sandbox HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	FormUID: 00000000000000000000000000000000,
	WorkflowId: 0,
	SubmissionUID: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	WorkflowId: 0,
	Rule: String,
	Log: 
	[
		{
			Tone: String,
			Mark: String,
			Text: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}