Field Squared API Services

<back to all web services

IntegrationRuleList

Represents a set or 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/{Workspace}/IntegrationRuleList
GET/{Workspace}/IntegrationRuleList/{IgnoreSecurity}
import Foundation
import ServiceStack

/**
* Represents a set or 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.
*/
public class IntegrationRuleList : Codable
{
    public var workspace:String
    public var dateGenerated:String
    public var integrationRules:[IntegrationRule] = []
    public var ignoreSecurity:Bool

    required public init(){}
}

/**
* 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.
*/
public class IntegrationRule : Codable
{
    public var workspaceId:String
    public var name:String
    public var data:[String:Object] = [:]
    public var objectType:String
    public var id:String
    public var conditionGroupItems:[ConditionGroupItem] = []
    public var actionsToTake:[Action] = []
    public var lastUpdated:Date
    public var modulePipeline:[RuleModuleDefinition] = []
    public var enabled:Bool
    public var workdayRestricted:Bool
    public var teams:[String] = []
    public var allowProgrammaticTrigger:Bool

    required public init(){}
}

public class ConditionGroupItem : Codable
{
    public var conditionGroups:[ConditionGroup] = []
    public var `precedence`:Int
    public var groupIdentifier:Int
    public var booleanOperator:String

    required public init(){}
}

public class ConditionGroup : Codable
{
    public var condition:Condition
    public var `precedence`:Int
    public var groupIdentifier:Int
    public var booleanOperator:String

    required public init(){}
}

public class Condition : Codable
{
    public var valueComparedTo:String
    public var valueToCompare:String
    public var comparisonOperator:PossibleComparisons

    required public init(){}
}

public enum PossibleComparisons : String, Codable
{
    case LTE
    case LT
    case GT
    case GTE
    case EQ
    case NE
    case NULL
    case NOTNULL
    case CHG
    case STARTS
    case LIKE
}

public class Action : Codable
{
    public var id:String
    public var callType:String
    public var actionToTake:String
    public var destination:String
    public var externalId:String
    public var externalParentId:String
    public var deleteTypeIfNotExists:String
    public var dataTree:[String:Object] = [:]
    public var data:String
    public var dataTypes:[String:Object] = [:]

    required public init(){}
}

public class RuleModuleDefinition : Codable
{
    public var isOutputModule:Bool
    public var name:String
    public var prerequisites:[String] = []
    public var parameters:[String:Object] = [:]
    public var type:String
    public var outputAction:Action

    required public init(){}
}


Swift IntegrationRuleList DTOs

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

HTTP + XML

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

GET /{Workspace}/IntegrationRuleList HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml