Evo Voice

<back to all web services

GetSystemSettings

Gets the system settings

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/system/settings
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


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EntityInfo:
    # @ApiMember(Description="The ID of the object")
    id: Optional[str] = None
    """
    The ID of the object
    """


    # @ApiMember(Description="The date the object was created")
    date_created: Optional[str] = None
    """
    The date the object was created
    """


    # @ApiMember(Description="The date the object was last modified")
    date_last_modified: Optional[str] = None
    """
    The date the object was last modified
    """


    # @ApiMember(Description="The user that created this object")
    created_by: Optional[str] = None
    """
    The user that created this object
    """


    # @ApiMember(Description="The user that last modified this object")
    last_modified_by: Optional[str] = None
    """
    The user that last modified this object
    """


class ValueTypes(str, Enum):
    NOT_SPECIFIED = 'NotSpecified'
    STRING = 'String'
    BOOLEAN = 'Boolean'
    NUMBER = 'Number'
    LIST = 'List'
    STRUCT = 'Struct'
    TRANSITION = 'Transition'
    CUSTOM = 'Custom'
    DATE = 'Date'
    AUDIO_FILE = 'AudioFile'
    TIME_ZONE_ID = 'TimeZoneId'
    PHONE_NUMBER = 'PhoneNumber'
    USER = 'User'
    ENDPOINT = 'Endpoint'
    TIME = 'Time'
    FILE = 'File'
    FAX_NUMBER = 'FaxNumber'
    EMAIL_ACCOUNT = 'EmailAccount'
    CUSTOMER = 'Customer'
    FLOW = 'Flow'
    TEAM = 'Team'
    FLOW_REFERENCE = 'FlowReference'
    INTEGRATION = 'Integration'
    ASSISTANT = 'Assistant'


class UIHints(str, Enum):
    NONE = 'None'
    LARGE_TEXT = 'LargeText'
    INLINE_FORM = 'InlineForm'
    PASSWORD = 'Password'
    INLINE_STRUCT = 'InlineStruct'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataType:
    type_name: Optional[str] = None
    fields: Optional[List[DataField]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Struct(Dict[str,Value]):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Value:
    bool_value: Optional[bool] = None
    string_value: Optional[str] = None
    number_value: Optional[float] = None
    list_value: Optional[List[Struct]] = None
    struct_value: Optional[Struct] = None


class DataFieldUniqueness(str, Enum):
    NOT_UNIQUE = 'NotUnique'
    UNIQUE = 'Unique'
    UNIQUE_TO_CUSTOMER = 'UniqueToCustomer'


class UserDataFieldModes(str, Enum):
    HIDDEN = 'Hidden'
    READ_ONLY = 'ReadOnly'
    READ_WRITE = 'ReadWrite'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataField:
    id: Optional[str] = None
    name: Optional[str] = None
    type: Optional[ValueTypes] = None
    ui_hint: Optional[UIHints] = None
    ui_tab: Optional[str] = None
    is_async: bool = False
    disable_binding: bool = False
    struct_type: Optional[DataType] = None
    list_type: Optional[DataType] = None
    description: Optional[str] = None
    possible_values: Optional[List[str]] = None
    is_output: bool = False
    custom_field_values_url: Optional[str] = None
    default_value: Optional[Value] = None
    transition_name_format: Optional[str] = None
    uniqueness: Optional[DataFieldUniqueness] = None
    voice_only: bool = False
    conditional_visibility_field: Optional[str] = None
    conditional_visibility_value: Optional[str] = None
    no_eval_template: bool = False
    user_mode: Optional[UserDataFieldModes] = None
    any_value_type: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SystemSettingsField(DataField):
    value: Optional[Value] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerDataField(DataField):
    show_in_search: bool = False


class EndpointTypes(str, Enum):
    PHONE_NUMBER = 'PhoneNumber'
    USER = 'User'
    FAX_NUMBER = 'FaxNumber'
    EMAIL_ADDRESS = 'EmailAddress'
    UNUSED_1 = 'Unused_1'
    UNUSED_2 = 'Unused_2'
    UNUSED_3 = 'Unused_3'
    UNUSED_4 = 'Unused_4'
    UNUSED_5 = 'Unused_5'
    TEAM = 'Team'
    ASSISTANT = 'Assistant'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EndpointDataField(DataField):
    show_in_search: bool = False
    show_in_lists: bool = False
    endpoint_type: Optional[EndpointTypes] = None
    is_caller_id: bool = False
    is_knob: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EmailAccount:
    id: Optional[str] = None
    server: Optional[str] = None
    user_name: Optional[str] = None
    port: int = 0
    email_address: Optional[str] = None
    display_name: Optional[str] = None
    password: Optional[str] = None


class TagColors(str, Enum):
    MAGENTA = 'Magenta'
    RED = 'Red'
    VOLCANO = 'Volcano'
    ORANGE = 'Orange'
    GOLD = 'Gold'
    LIME = 'Lime'
    GREEN = 'Green'
    CYAN = 'Cyan'
    BLUE = 'Blue'
    GEEK_BLUE = 'GeekBlue'
    PURPLE = 'Purple'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Tag:
    id: Optional[str] = None
    name: Optional[str] = None
    color: Optional[TagColors] = None


class TwilioSipRegions(str, Enum):
    NORTH_AMERICA_VIRGINIA = 'NorthAmericaVirginia'
    NORTH_AMERICA_OREGON = 'NorthAmericaOregon'
    EUROPE_IRELAND = 'EuropeIreland'
    EUROPE_FRANKFURT = 'EuropeFrankfurt'
    ASIA_PACIFIC_SINGAPORE = 'AsiaPacificSingapore'
    ASIA_PACIFIC_TOKYO = 'AsiaPacificTokyo'
    ASIA_PACIFIC_SYDNEY = 'AsiaPacificSydney'
    SOUTH_AMERICA_SAN_PAOLO = 'SouthAmericaSanPaolo'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SystemSettingsInfo(EntityInfo):
    # @ApiMember(Description="Use to override the system time for testing")
    override_system_time: bool = False
    """
    Use to override the system time for testing
    """


    # @ApiMember(Description="The system override time zone")
    override_system_time_zone_id: Optional[str] = None
    """
    The system override time zone
    """


    # @ApiMember(Description="The system override date/time")
    override_system_date_time: Optional[str] = None
    """
    The system override date/time
    """


    # @ApiMember(Description="The list of system settings fields")
    system_fields: Optional[List[SystemSettingsField]] = None
    """
    The list of system settings fields
    """


    # @ApiMember(Description="The list of customer metadata fields")
    customer_fields: Optional[List[CustomerDataField]] = None
    """
    The list of customer metadata fields
    """


    # @ApiMember(Description="The list of endpoint metadata fields")
    endpoint_fields: Optional[List[EndpointDataField]] = None
    """
    The list of endpoint metadata fields
    """


    # @ApiMember(Description="The list of email accounts")
    email_accounts: Optional[List[EmailAccount]] = None
    """
    The list of email accounts
    """


    # @ApiMember(Description="The list of tags in the system")
    tags: Optional[List[Tag]] = None
    """
    The list of tags in the system
    """


    # @ApiMember(Description="Documentation for the account")
    documentation: Optional[str] = None
    """
    Documentation for the account
    """


    # @ApiMember(Description="The number of days recordings are retained")
    recording_retention_days: int = 0
    """
    The number of days recordings are retained
    """


    # @ApiMember(Description="Enable the SIP refer beta")
    enable_sip_refer: bool = False
    """
    Enable the SIP refer beta
    """


    # @ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")
    auto_agent_logoff_seconds: int = 0
    """
    The number of seconds after which we automatically logoff a not ready agent
    """


    # @ApiMember(Description="The default SIP region for new devices")
    default_sip_region: Optional[TwilioSipRegions] = None
    """
    The default SIP region for new devices
    """


# @Api(Description="Gets the system settings")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetSystemSettings(IGet):
    """
    Gets the system settings
    """

    # @ApiMember(Description="The account ID whose system settings you want")
    account_id: Optional[str] = None
    """
    The account ID whose system settings you want
    """

Python GetSystemSettings 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 /system/settings HTTP/1.1 
Host: team.evovoice.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	overrideSystemTime: False,
	overrideSystemTimeZoneId: String,
	overrideSystemDateTime: String,
	systemFields: 
	[
		{
			value: 
			{
				boolValue: False,
				stringValue: String,
				numberValue: 0,
				listValue: 
				[
					null
				]
			},
			id: String,
			name: String,
			type: NotSpecified,
			uiHint: None,
			uiTab: String,
			isAsync: False,
			disableBinding: False,
			description: String,
			possibleValues: 
			[
				String
			],
			isOutput: False,
			customFieldValuesUrl: String,
			defaultValue: 
			{
				boolValue: False,
				stringValue: String,
				numberValue: 0,
				listValue: 
				[
					null
				]
			},
			transitionNameFormat: String,
			uniqueness: NotUnique,
			voiceOnly: False,
			conditionalVisibilityField: String,
			conditionalVisibilityValue: String,
			noEvalTemplate: False,
			userMode: Hidden,
			anyValueType: False
		}
	],
	customerFields: 
	[
		{
			showInSearch: False,
			id: String,
			name: String,
			type: NotSpecified,
			uiHint: None,
			uiTab: String,
			isAsync: False,
			disableBinding: False,
			description: String,
			possibleValues: 
			[
				String
			],
			isOutput: False,
			customFieldValuesUrl: String,
			defaultValue: 
			{
				boolValue: False,
				stringValue: String,
				numberValue: 0,
				listValue: 
				[
					null
				]
			},
			transitionNameFormat: String,
			uniqueness: NotUnique,
			voiceOnly: False,
			conditionalVisibilityField: String,
			conditionalVisibilityValue: String,
			noEvalTemplate: False,
			userMode: Hidden,
			anyValueType: False
		}
	],
	endpointFields: 
	[
		{
			showInSearch: False,
			showInLists: False,
			endpointType: PhoneNumber,
			isCallerId: False,
			isKnob: False,
			id: String,
			name: String,
			type: NotSpecified,
			uiHint: None,
			uiTab: String,
			isAsync: False,
			disableBinding: False,
			description: String,
			possibleValues: 
			[
				String
			],
			isOutput: False,
			customFieldValuesUrl: String,
			defaultValue: 
			{
				boolValue: False,
				stringValue: String,
				numberValue: 0,
				listValue: 
				[
					null
				]
			},
			transitionNameFormat: String,
			uniqueness: NotUnique,
			voiceOnly: False,
			conditionalVisibilityField: String,
			conditionalVisibilityValue: String,
			noEvalTemplate: False,
			userMode: Hidden,
			anyValueType: False
		}
	],
	emailAccounts: 
	[
		{
			id: String,
			server: String,
			userName: String,
			port: 0,
			emailAddress: String,
			displayName: String,
			password: String
		}
	],
	tags: 
	[
		{
			id: String,
			name: String,
			color: Magenta
		}
	],
	documentation: String,
	recordingRetentionDays: 0,
	enableSipRefer: False,
	autoAgentLogoffSeconds: 0,
	defaultSipRegion: NorthAmericaVirginia,
	id: String,
	dateCreated: String,
	dateLastModified: String,
	createdBy: String,
	lastModifiedBy: String
}