| Requires any of the roles: | SystemAdministrator, Manager, Customer |
| GET | /endpoints/app/config |
|---|
import Foundation
import ServiceStack
public class GetEndpointAppConfig : Codable
{
/**
* The endpoint whose config you want to get (this must be a User)
*/
// @ApiMember(Description="The endpoint whose config you want to get (this must be a User)")
public var endpointId:String
/**
* The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this
*/
// @ApiMember(Description="The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this")
public var endpointEmailAddress:String
/**
* The type of device you are requesting config for
*/
// @ApiMember(Description="The type of device you are requesting config for")
public var deviceType:DeviceTypes
/**
* Use a specific push credential SID
*/
// @ApiMember(Description="Use a specific push credential SID")
public var pushCredentialSid:String
/**
* Use a specific application SID
*/
// @ApiMember(Description="Use a specific application SID")
public var applicationSid:String
/**
* Is this device operating in a sandbox environment? IOS only.
*/
// @ApiMember(Description="Is this device operating in a sandbox environment? IOS only.")
public var sandbox:Bool
required public init(){}
}
public enum DeviceTypes : String, Codable
{
case Web
case iOS
case Android
}
public class AppConfig : Codable
{
/**
* The ID of this endpoint
*/
// @ApiMember(Description="The ID of this endpoint")
public var endpointId:String
/**
* The ID of the account
*/
// @ApiMember(Description="The ID of the account")
public var accountId:String
/**
* The customer ID associated with this user
*/
// @ApiMember(Description="The customer ID associated with this user")
public var customerId:String
/**
* The access token for use with Twilio Voice
*/
// @ApiMember(Description="The access token for use with Twilio Voice")
public var accessToken:String
/**
* The access token's identity
*/
// @ApiMember(Description="The access token's identity")
public var identity:String
/**
* The email address of the user
*/
// @ApiMember(Description="The email address of the user")
public var emailAddress:String
/**
* The user's information
*/
// @ApiMember(Description="The user's information")
public var userInfo:AppUserInfo
/**
* The agent state (for call center users)
*/
// @ApiMember(Description="The agent state (for call center users)")
public var agentState:AgentStates
/**
* The agent state reason
*/
// @ApiMember(Description="The agent state reason")
public var agentStateReason:AgentStateReasons
/**
* The tabs for the app
*/
// @ApiMember(Description="The tabs for the app")
public var tabs:[String]
/**
* The app settings
*/
// @ApiMember(Description="The app settings")
public var appSettings:AppSettings
/**
* The phone settings for third party connectivity
*/
// @ApiMember(Description="The phone settings for third party connectivity")
public var thirdPartyPhoneSystemSettings:ThirdPartyPhoneSystemSettings
required public init(){}
}
public class AppUserInfo : Codable
{
/**
* The user's first name
*/
// @ApiMember(Description="The user's first name")
public var firstName:String
/**
* The user's last name
*/
// @ApiMember(Description="The user's last name")
public var lastName:String
/**
* Shortcut to the user's full name
*/
// @ApiMember(Description="Shortcut to the user's full name")
public var name:String
/**
* The URL to the user's avatar
*/
// @ApiMember(Description="The URL to the user's avatar")
public var avatarUrl:String
required public init(){}
}
public enum AgentStates : String, Codable
{
case Unknown
case Ready
case NotReady
case LoggedOut
case WrapUp
case Outgoing
case Other
}
public enum AgentStateReasons : String, Codable
{
case Unknown
case SetByUser
case MissedCall
case SetBySystem
}
public class AppSettings : Codable
{
public var enablePhoneNumberManagement:Bool
public var enableDeviceManagement:Bool
public var enableDialer:Bool
public var enableCallHistory:Bool
public var enableAssistants:Bool
public var showFileNameInMessageCenter:Bool
public var chakraTheme:String
public var customCss:String
public var pageTitle:String
public var stringMappings:String
public var logoutUrl:String
public var portMyNumberUrl:String
required public init(){}
}
public class ThirdPartyPhoneSystemSettings : Codable
{
public var type:ThirdPartyPhoneSystemTypes
public var sipSettings:ThirdPartySipSettings
public var demoSettings:ThirdPartyDemoSettings
required public init(){}
}
public enum ThirdPartyPhoneSystemTypes : String, Codable
{
case Demo
case Sip
}
public class ThirdPartySipSettings : Codable
{
public var accounts:[ThirdPartySipAccountSettings]
required public init(){}
}
public class ThirdPartySipAccountSettings : Codable
{
public var number:String
public var agent:String
public var authName:String
public var userName:String
public var displayName:String
public var password:String
public var userDomain:String
public var registrationExpires:Int
public var transportType:TransportTypes
public var localIP:String
public var localPort:Int
public var sipServer:String
public var sipServerPort:Int
public var outboundServer:String
public var outboundServerPort:Int
public var stunServer:String
public var stunPort:Int
public var audioPlaybackDeviceName:String
public var audioRecordingDeviceName:String
public var audioCodecs:[AudioCodecTypes]
public var dtmfMethod:DtmfMethods
required public init(){}
}
public enum TransportTypes : String, Codable
{
case UDP
case TLS
case TCP
case PERS
}
public enum AudioCodecTypes : Int, Codable
{
case PCMU = 0
case GSM = 3
case PCMA = 8
case G722 = 9
case G729 = 18
case ILBC = 97
case AMR = 98
case AMRWB = 99
case SPEEX = 100
case DTMF = 101
case SPEEXWB = 102
case ISACWB = 103
case ISACSWB = 104
case OPUS = 105
case G7221 = 121
case NONE = -1
}
public enum DtmfMethods : String, Codable
{
case RFC2833
case INFO
}
public class ThirdPartyDemoSettings : Codable
{
public var `extension`:String
required public init(){}
}
Swift GetEndpointAppConfig DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /endpoints/app/config HTTP/1.1 Host: evovoice.io Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<AppConfig xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.App">
<AccessToken>String</AccessToken>
<AccountId>String</AccountId>
<AgentState>Unknown</AgentState>
<AgentStateReason>Unknown</AgentStateReason>
<AppSettings xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
<d2p1:ChakraTheme>String</d2p1:ChakraTheme>
<d2p1:CustomCss>String</d2p1:CustomCss>
<d2p1:EnableAssistants>false</d2p1:EnableAssistants>
<d2p1:EnableCallHistory>false</d2p1:EnableCallHistory>
<d2p1:EnableDeviceManagement>false</d2p1:EnableDeviceManagement>
<d2p1:EnableDialer>false</d2p1:EnableDialer>
<d2p1:EnablePhoneNumberManagement>false</d2p1:EnablePhoneNumberManagement>
<d2p1:LogoutUrl>String</d2p1:LogoutUrl>
<d2p1:PageTitle>String</d2p1:PageTitle>
<d2p1:PortMyNumberUrl>String</d2p1:PortMyNumberUrl>
<d2p1:ShowFileNameInMessageCenter>false</d2p1:ShowFileNameInMessageCenter>
<d2p1:StringMappings>String</d2p1:StringMappings>
</AppSettings>
<CustomerId>String</CustomerId>
<EmailAddress>String</EmailAddress>
<EndpointId>String</EndpointId>
<Identity>String</Identity>
<Tabs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:anyType />
</Tabs>
<ThirdPartyPhoneSystemSettings xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Endpoints">
<d2p1:DemoSettings>
<d2p1:Extension>String</d2p1:Extension>
</d2p1:DemoSettings>
<d2p1:SipSettings>
<d2p1:Accounts>
<d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings>
<d2p1:Agent>String</d2p1:Agent>
<d2p1:AudioCodecs>
<d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes>PCMU</d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes>
</d2p1:AudioCodecs>
<d2p1:AudioPlaybackDeviceName>String</d2p1:AudioPlaybackDeviceName>
<d2p1:AudioRecordingDeviceName>String</d2p1:AudioRecordingDeviceName>
<d2p1:AuthName>String</d2p1:AuthName>
<d2p1:DTMFMethod>RFC2833</d2p1:DTMFMethod>
<d2p1:DisplayName>String</d2p1:DisplayName>
<d2p1:LocalIP>String</d2p1:LocalIP>
<d2p1:LocalPort>0</d2p1:LocalPort>
<d2p1:Number>String</d2p1:Number>
<d2p1:OutboundServer>String</d2p1:OutboundServer>
<d2p1:OutboundServerPort>0</d2p1:OutboundServerPort>
<d2p1:Password>String</d2p1:Password>
<d2p1:RegistrationExpires>0</d2p1:RegistrationExpires>
<d2p1:SipServer>String</d2p1:SipServer>
<d2p1:SipServerPort>0</d2p1:SipServerPort>
<d2p1:StunPort>0</d2p1:StunPort>
<d2p1:StunServer>String</d2p1:StunServer>
<d2p1:TransportType>UDP</d2p1:TransportType>
<d2p1:UserDomain>String</d2p1:UserDomain>
<d2p1:UserName>String</d2p1:UserName>
</d2p1:ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings>
</d2p1:Accounts>
</d2p1:SipSettings>
<d2p1:Type>Demo</d2p1:Type>
</ThirdPartyPhoneSystemSettings>
<UserInfo>
<AvatarUrl>String</AvatarUrl>
<FirstName>String</FirstName>
<LastName>String</LastName>
<Name>String</Name>
</UserInfo>
</AppConfig>