Trendsic Platform Service

<back to all web services

FormAutomationsRequest

Requires Authentication
The following routes are available for this service:
GET/v1/forms/{FormUID}/automations
"use strict";
export class FormAutomationRule {
    /** @param {{WorkflowId?:number,Name?:string,Sentence?:string,State?:string,StateText?:string,Numbers?:string,Warn?:string,AnyApplication?:boolean,AlsoOthers?:boolean,SharedText?:string,FromStarter?:boolean,EngineLink?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    WorkflowId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Sentence;
    /** @type {string} */
    State;
    /** @type {string} */
    StateText;
    /** @type {string} */
    Numbers;
    /** @type {string} */
    Warn;
    /** @type {boolean} */
    AnyApplication;
    /** @type {boolean} */
    AlsoOthers;
    /** @type {string} */
    SharedText;
    /** @type {boolean} */
    FromStarter;
    /** @type {string} */
    EngineLink;
}
export class FormAutomationStarter {
    /** @param {{Key?:string,Name?:string,Text?:string,Added?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Name;
    /** @type {string} */
    Text;
    /** @type {boolean} */
    Added;
}
export class FormMappingRow {
    /** @param {{Field?:string,FieldKey?:string,Target?:string,Tone?:string,Note?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Field;
    /** @type {string} */
    FieldKey;
    /** @type {string} */
    Target;
    /** @type {string} */
    Tone;
    /** @type {string} */
    Note;
}
export class FormAutomationsResponse {
    /** @param {{Rules?:FormAutomationRule[],Starters?:FormAutomationStarter[],Mapping?:FormMappingRow[],MapSummary?:string,CanAdd?:boolean,AddRefusal?:string,CanToggle?:boolean,CanRemove?:boolean,CanOpenEngine?:boolean,ReservedKeys?:string[],TestableFields?:string[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {FormAutomationRule[]} */
    Rules = [];
    /** @type {FormAutomationStarter[]} */
    Starters = [];
    /** @type {FormMappingRow[]} */
    Mapping = [];
    /** @type {string} */
    MapSummary;
    /** @type {boolean} */
    CanAdd;
    /** @type {string} */
    AddRefusal;
    /** @type {boolean} */
    CanToggle;
    /** @type {boolean} */
    CanRemove;
    /** @type {boolean} */
    CanOpenEngine;
    /** @type {string[]} */
    ReservedKeys = [];
    /** @type {string[]} */
    TestableFields = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class FormAutomationsRequest {
    /** @param {{FormUID?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    FormUID;
}

JavaScript 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
		}
	}
}