Trendsic Platform Service

<back to all web services

FormAutomationsRequest

Requires Authentication
The following routes are available for this service:
GET/v1/forms/{FormUID}/automations

export class FormAutomationRule
{
    public WorkflowId: number;
    public Name: string;
    public Sentence: string;
    public State: string;
    public StateText: string;
    public Numbers: string;
    public Warn: string;
    public AnyApplication: boolean;
    public AlsoOthers: boolean;
    public SharedText: string;
    public FromStarter: boolean;
    public EngineLink: string;

    public constructor(init?: Partial<FormAutomationRule>) { (Object as any).assign(this, init); }
}

export class FormAutomationStarter
{
    public Key: string;
    public Name: string;
    public Text: string;
    public Added: boolean;

    public constructor(init?: Partial<FormAutomationStarter>) { (Object as any).assign(this, init); }
}

export class FormMappingRow
{
    public Field: string;
    public FieldKey: string;
    public Target: string;
    public Tone: string;
    public Note: string;

    public constructor(init?: Partial<FormMappingRow>) { (Object as any).assign(this, init); }
}

export class FormAutomationsResponse
{
    public Rules: FormAutomationRule[] = [];
    public Starters: FormAutomationStarter[] = [];
    public Mapping: FormMappingRow[] = [];
    public MapSummary: string;
    public CanAdd: boolean;
    public AddRefusal: string;
    public CanToggle: boolean;
    public CanRemove: boolean;
    public CanOpenEngine: boolean;
    public ReservedKeys: string[] = [];
    public TestableFields: string[] = [];
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<FormAutomationsResponse>) { (Object as any).assign(this, init); }
}

export class FormAutomationsRequest
{
    public FormUID: string;

    public constructor(init?: Partial<FormAutomationsRequest>) { (Object as any).assign(this, init); }
}

TypeScript FormAutomationsRequest 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.

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

{
	Rules: 
	[
		{
			WorkflowId: 0,
			Name: String,
			Sentence: String,
			State: String,
			StateText: String,
			Numbers: String,
			Warn: String,
			AnyApplication: False,
			AlsoOthers: False,
			SharedText: String,
			FromStarter: False,
			EngineLink: String
		}
	],
	Starters: 
	[
		{
			Key: String,
			Name: String,
			Text: String,
			Added: False
		}
	],
	Mapping: 
	[
		{
			Field: String,
			FieldKey: String,
			Target: String,
			Tone: String,
			Note: String
		}
	],
	MapSummary: String,
	CanAdd: False,
	AddRefusal: String,
	CanToggle: False,
	CanRemove: False,
	CanOpenEngine: False,
	ReservedKeys: 
	[
		String
	],
	TestableFields: 
	[
		String
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}