Field Squared API Services

<back to all web services

IntegrationRule

Represents a set of rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.

The following routes are available for this service:
GET,PUT,DELETE/{WorkspaceId}/IntegrationRule/{Id}
namespace Field2Office.API.Model

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type PossibleComparisons =
        | LTE = 0
        | LT = 1
        | GT = 2
        | GTE = 3
        | EQ = 4
        | NE = 5
        | NULL = 6
        | NOTNULL = 7
        | CHG = 8
        | STARTS = 9
        | LIKE = 10

    [<AllowNullLiteral>]
    type Condition() = 
        member val ValueComparedTo:String = null with get,set
        member val ValueToCompare:String = null with get,set
        member val ComparisonOperator:PossibleComparisons = new PossibleComparisons() with get,set

    [<AllowNullLiteral>]
    type ConditionGroup() = 
        member val Condition:Condition = null with get,set
        member val Precedence:Int32 = new Int32() with get,set
        member val GroupIdentifier:Int32 = new Int32() with get,set
        member val BooleanOperator:String = null with get,set

    [<AllowNullLiteral>]
    type ConditionGroupItem() = 
        member val ConditionGroups:ResizeArray<ConditionGroup> = new ResizeArray<ConditionGroup>() with get,set
        member val Precedence:Int32 = new Int32() with get,set
        member val GroupIdentifier:Int32 = new Int32() with get,set
        member val BooleanOperator:String = null with get,set

    [<AllowNullLiteral>]
    type Action() = 
        member val Id:String = null with get,set
        member val CallType:String = null with get,set
        member val ActionToTake:String = null with get,set
        member val Destination:String = null with get,set
        member val ExternalId:String = null with get,set
        member val ExternalParentId:String = null with get,set
        member val DeleteTypeIfNotExists:String = null with get,set
        member val DataTree:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
        member val Data:String = null with get,set
        member val DataTypes:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set

    [<AllowNullLiteral>]
    type RuleModuleDefinition() = 
        member val IsOutputModule:Boolean = new Boolean() with get,set
        member val Name:String = null with get,set
        member val Prerequisites:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val Parameters:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
        member val Type:String = null with get,set
        member val OutputAction:Action = null with get,set

    ///<summary>
    ///Represents a set of rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.
    ///</summary>
    [<AllowNullLiteral>]
    type IntegrationRule() = 
        member val WorkspaceId:String = null with get,set
        member val Name:String = null with get,set
        member val Data:Dictionary<String, Object> = new Dictionary<String, Object>() with get,set
        member val ObjectType:String = null with get,set
        member val Id:String = null with get,set
        member val ConditionGroupItems:ResizeArray<ConditionGroupItem> = new ResizeArray<ConditionGroupItem>() with get,set
        member val ActionsToTake:ResizeArray<Action> = new ResizeArray<Action>() with get,set
        member val LastUpdated:DateTime = new DateTime() with get,set
        member val ModulePipeline:ResizeArray<RuleModuleDefinition> = new ResizeArray<RuleModuleDefinition>() with get,set
        member val Enabled:Boolean = new Boolean() with get,set
        member val WorkdayRestricted:Boolean = new Boolean() with get,set
        member val Teams:ResizeArray<String> = new ResizeArray<String>() with get,set
        member val AllowProgrammaticTrigger:Boolean = new Boolean() with get,set

F# IntegrationRule 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.

PUT /{WorkspaceId}/IntegrationRule/{Id} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	WorkspaceId: String,
	Name: String,
	Data: 
	{
		value: String
	},
	ObjectType: String,
	Id: String,
	ConditionGroupItems: 
	[
		{
			ConditionGroups: 
			[
				{
					Condition: 
					{
						ValueComparedTo: String,
						ValueToCompare: String,
						ComparisonOperator: LTE
					},
					Precedence: 0,
					GroupIdentifier: 0,
					BooleanOperator: String
				}
			],
			Precedence: 0,
			GroupIdentifier: 0,
			BooleanOperator: String
		}
	],
	ActionsToTake: 
	[
		{
			Id: String,
			CallType: String,
			ActionToTake: String,
			Destination: String,
			ExternalId: String,
			ExternalParentId: String,
			DeleteTypeIfNotExists: String,
			DataTree: 
			{
				String: {}
			},
			Data: String,
			DataTypes: 
			{
				String: {}
			}
		}
	],
	LastUpdated: 0001-01-01,
	ModulePipeline: 
	[
		{
			IsOutputModule: False,
			Name: String,
			Prerequisites: 
			[
				String
			],
			Parameters: 
			{
				String: {}
			},
			Type: String,
			OutputAction: 
			{
				Id: String,
				CallType: String,
				ActionToTake: String,
				Destination: String,
				ExternalId: String,
				ExternalParentId: String,
				DeleteTypeIfNotExists: String,
				DataTree: 
				{
					String: {}
				},
				Data: String,
				DataTypes: 
				{
					String: {}
				}
			}
		}
	],
	Enabled: False,
	WorkdayRestricted: False,
	Teams: 
	[
		String
	],
	AllowProgrammaticTrigger: False
}