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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


class PossibleComparisons(str, Enum):
    LTE = 'LTE'
    LT = 'LT'
    GT = 'GT'
    GTE = 'GTE'
    EQ = 'EQ'
    NE = 'NE'
    NULL = 'NULL'
    NOTNULL = 'NOTNULL'
    CHG = 'CHG'
    STARTS = 'STARTS'
    LIKE = 'LIKE'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Condition:
    value_compared_to: Optional[str] = None
    value_to_compare: Optional[str] = None
    comparison_operator: Optional[PossibleComparisons] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConditionGroup:
    condition: Optional[Condition] = None
    precedence: int = 0
    group_identifier: int = 0
    boolean_operator: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConditionGroupItem:
    condition_groups: Optional[List[ConditionGroup]] = None
    precedence: int = 0
    group_identifier: int = 0
    boolean_operator: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Action:
    id: Optional[str] = None
    call_type: Optional[str] = None
    action_to_take: Optional[str] = None
    destination: Optional[str] = None
    external_id: Optional[str] = None
    external_parent_id: Optional[str] = None
    delete_type_if_not_exists: Optional[str] = None
    data_tree: Optional[Dict[str, Object]] = None
    data: Optional[str] = None
    data_types: Optional[Dict[str, Object]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RuleModuleDefinition:
    is_output_module: bool = False
    name: Optional[str] = None
    prerequisites: Optional[List[str]] = None
    parameters: Optional[Dict[str, Object]] = None
    type: Optional[str] = None
    output_action: Optional[Action] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class 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.
    """

    workspace_id: Optional[str] = None
    name: Optional[str] = None
    data: Optional[Dict[str, Object]] = None
    object_type: Optional[str] = None
    id: Optional[str] = None
    condition_group_items: Optional[List[ConditionGroupItem]] = None
    actions_to_take: Optional[List[Action]] = None
    last_updated: datetime.datetime = datetime.datetime(1, 1, 1)
    module_pipeline: Optional[List[RuleModuleDefinition]] = None
    enabled: bool = False
    workday_restricted: bool = False
    teams: Optional[List[str]] = None
    allow_programmatic_trigger: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class 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.
    """

    workspace: Optional[str] = None
    date_generated: Optional[str] = None
    integration_rules: Optional[List[IntegrationRule]] = None
    ignore_security: bool = False

Python IntegrationRuleList 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 /{Workspace}/IntegrationRuleList HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv