Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /system/settings |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Gets the system settings
*/
@Api(Description="Gets the system settings")
open class GetSystemSettings : IGet
{
/**
* The account ID whose system settings you want
*/
@ApiMember(Description="The account ID whose system settings you want")
open var accountId:String? = null
}
open class SystemSettingsInfo : EntityInfo()
{
/**
* Use to override the system time for testing
*/
@ApiMember(Description="Use to override the system time for testing")
open var overrideSystemTime:Boolean? = null
/**
* The system override time zone
*/
@ApiMember(Description="The system override time zone")
open var overrideSystemTimeZoneId:String? = null
/**
* The system override date/time
*/
@ApiMember(Description="The system override date/time")
open var overrideSystemDateTime:String? = null
/**
* The list of system settings fields
*/
@ApiMember(Description="The list of system settings fields")
open var systemFields:ArrayList<SystemSettingsField>? = null
/**
* The list of customer metadata fields
*/
@ApiMember(Description="The list of customer metadata fields")
open var customerFields:ArrayList<CustomerDataField>? = null
/**
* The list of endpoint metadata fields
*/
@ApiMember(Description="The list of endpoint metadata fields")
open var endpointFields:ArrayList<EndpointDataField>? = null
/**
* The list of email accounts
*/
@ApiMember(Description="The list of email accounts")
open var emailAccounts:ArrayList<EmailAccount>? = null
/**
* The list of tags in the system
*/
@ApiMember(Description="The list of tags in the system")
open var tags:ArrayList<Tag>? = null
/**
* Documentation for the account
*/
@ApiMember(Description="Documentation for the account")
open var documentation:String? = null
/**
* The number of days recordings are retained
*/
@ApiMember(Description="The number of days recordings are retained")
open var recordingRetentionDays:Int? = null
/**
* Enable the SIP refer beta
*/
@ApiMember(Description="Enable the SIP refer beta")
open var enableSipRefer:Boolean? = null
/**
* The number of seconds after which we automatically logoff a not ready agent
*/
@ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent")
open var autoAgentLogoffSeconds:Int? = null
/**
* The default SIP region for new devices
*/
@ApiMember(Description="The default SIP region for new devices")
open var defaultSipRegion:TwilioSipRegions? = null
}
open class EntityInfo
{
/**
* The ID of the object
*/
@ApiMember(Description="The ID of the object")
open var id:String? = null
/**
* The date the object was created
*/
@ApiMember(Description="The date the object was created")
open var dateCreated:String? = null
/**
* The date the object was last modified
*/
@ApiMember(Description="The date the object was last modified")
open var dateLastModified:String? = null
/**
* The user that created this object
*/
@ApiMember(Description="The user that created this object")
open var createdBy:String? = null
/**
* The user that last modified this object
*/
@ApiMember(Description="The user that last modified this object")
open var lastModifiedBy:String? = null
}
open class SystemSettingsField : DataField()
{
open var value:Value? = null
}
open class DataField
{
open var id:String? = null
open var name:String? = null
@SerializedName("type") open var Type:ValueTypes? = null
open var uiHint:UIHints? = null
open var uiTab:String? = null
open var isAsync:Boolean? = null
open var disableBinding:Boolean? = null
open var structType:DataType? = null
open var listType:DataType? = null
open var description:String? = null
open var possibleValues:ArrayList<String>? = null
open var isOutput:Boolean? = null
open var customFieldValuesUrl:String? = null
open var defaultValue:Value? = null
open var transitionNameFormat:String? = null
open var uniqueness:DataFieldUniqueness? = null
open var voiceOnly:Boolean? = null
open var conditionalVisibilityField:String? = null
open var conditionalVisibilityValue:String? = null
open var noEvalTemplate:Boolean? = null
open var userMode:UserDataFieldModes? = null
open var anyValueType:Boolean? = null
}
enum class ValueTypes
{
NotSpecified,
String,
Boolean,
Number,
List,
Struct,
Transition,
Custom,
Date,
AudioFile,
TimeZoneId,
PhoneNumber,
User,
Endpoint,
Time,
File,
FaxNumber,
EmailAccount,
Customer,
Flow,
Team,
FlowReference,
Integration,
Assistant,
}
enum class UIHints
{
None,
LargeText,
InlineForm,
Password,
InlineStruct,
}
open class DataType
{
open var typeName:String? = null
open var fields:ArrayList<DataField>? = null
}
open class Value
{
open var boolValue:Boolean? = null
open var stringValue:String? = null
open var numberValue:Double? = null
open var listValue:ArrayList<Struct>? = null
open var structValue:Struct? = null
}
open class Struct : HashMap<String,Value>()
{
}
enum class DataFieldUniqueness
{
NotUnique,
Unique,
UniqueToCustomer,
}
enum class UserDataFieldModes
{
Hidden,
ReadOnly,
ReadWrite,
}
open class CustomerDataField : DataField()
{
open var showInSearch:Boolean? = null
}
open class EndpointDataField : DataField()
{
open var showInSearch:Boolean? = null
open var showInLists:Boolean? = null
open var endpointType:EndpointTypes? = null
open var isCallerId:Boolean? = null
open var isKnob:Boolean? = null
}
enum class EndpointTypes
{
PhoneNumber,
User,
FaxNumber,
EmailAddress,
Unused1,
Unused2,
Unused3,
Unused4,
Unused5,
Team,
Assistant,
}
open class EmailAccount
{
open var id:String? = null
open var server:String? = null
open var userName:String? = null
open var port:Int? = null
open var emailAddress:String? = null
open var displayName:String? = null
open var password:String? = null
}
open class Tag
{
open var id:String? = null
open var name:String? = null
open var color:TagColors? = null
}
enum class TagColors
{
Magenta,
Red,
Volcano,
Orange,
Gold,
Lime,
Green,
Cyan,
Blue,
GeekBlue,
Purple,
}
enum class TwilioSipRegions
{
NorthAmericaVirginia,
NorthAmericaOregon,
EuropeIreland,
EuropeFrankfurt,
AsiaPacificSingapore,
AsiaPacificTokyo,
AsiaPacificSydney,
SouthAmericaSanPaolo,
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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 }