Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /endpoints/app/config |
---|
namespace Voice.Api.App
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type AppUserInfo() =
///<summary>
///The user's first name
///</summary>
[<ApiMember(Description="The user's first name")>]
member val FirstName:String = null with get,set
///<summary>
///The user's last name
///</summary>
[<ApiMember(Description="The user's last name")>]
member val LastName:String = null with get,set
///<summary>
///Shortcut to the user's full name
///</summary>
[<ApiMember(Description="Shortcut to the user's full name")>]
member val Name:String = null with get,set
///<summary>
///The URL to the user's avatar
///</summary>
[<ApiMember(Description="The URL to the user's avatar")>]
member val AvatarUrl:String = null with get,set
type AgentStates =
| Unknown = 0
| Ready = 1
| NotReady = 2
| LoggedOut = 3
| WrapUp = 4
| Outgoing = 5
| Other = 6
type AgentStateReasons =
| Unknown = 0
| SetByUser = 1
| MissedCall = 2
| SetBySystem = 3
[<AllowNullLiteral>]
type AppSettings() =
member val EnablePhoneNumberManagement:Boolean = new Boolean() with get,set
member val EnableDeviceManagement:Boolean = new Boolean() with get,set
member val EnableDialer:Boolean = new Boolean() with get,set
member val EnableCallHistory:Boolean = new Boolean() with get,set
member val ShowFileNameInMessageCenter:Boolean = new Boolean() with get,set
member val ChakraTheme:String = null with get,set
member val CustomCss:String = null with get,set
member val PageTitle:String = null with get,set
member val StringMappings:String = null with get,set
member val LogoutUrl:String = null with get,set
member val PortMyNumberUrl:String = null with get,set
type ThirdPartyPhoneSystemTypes =
| Demo = 0
| Sip = 1
type TransportTypes =
| UDP = 0
| TLS = 1
| TCP = 2
| PERS = 3
type AudioCodecTypes =
| PCMU = 0
| GSM = 3
| PCMA = 8
| G722 = 9
| G729 = 18
| ILBC = 97
| AMR = 98
| AMRWB = 99
| SPEEX = 100
| DTMF = 101
| SPEEXWB = 102
| ISACWB = 103
| ISACSWB = 104
| OPUS = 105
| G7221 = 121
| NONE = -1
type DtmfMethods =
| RFC2833 = 0
| INFO = 1
[<AllowNullLiteral>]
type ThirdPartySipAccountSettings() =
member val Number:String = null with get,set
member val Agent:String = null with get,set
member val AuthName:String = null with get,set
member val UserName:String = null with get,set
member val DisplayName:String = null with get,set
member val Password:String = null with get,set
member val UserDomain:String = null with get,set
member val RegistrationExpires:Int32 = new Int32() with get,set
member val TransportType:TransportTypes = new TransportTypes() with get,set
member val LocalIP:String = null with get,set
member val LocalPort:Int32 = new Int32() with get,set
member val SipServer:String = null with get,set
member val SipServerPort:Int32 = new Int32() with get,set
member val OutboundServer:String = null with get,set
member val OutboundServerPort:Int32 = new Int32() with get,set
member val StunServer:String = null with get,set
member val StunPort:Int32 = new Int32() with get,set
member val AudioPlaybackDeviceName:String = null with get,set
member val AudioRecordingDeviceName:String = null with get,set
member val AudioCodecs:ResizeArray<AudioCodecTypes> = new ResizeArray<AudioCodecTypes>() with get,set
member val DTMFMethod:DtmfMethods = new DtmfMethods() with get,set
[<AllowNullLiteral>]
type ThirdPartySipSettings() =
member val Accounts:ResizeArray<ThirdPartySipAccountSettings> = new ResizeArray<ThirdPartySipAccountSettings>() with get,set
[<AllowNullLiteral>]
type ThirdPartyDemoSettings() =
member val Extension:String = null with get,set
[<AllowNullLiteral>]
type ThirdPartyPhoneSystemSettings() =
member val Type:ThirdPartyPhoneSystemTypes = new ThirdPartyPhoneSystemTypes() with get,set
member val SipSettings:ThirdPartySipSettings = null with get,set
member val DemoSettings:ThirdPartyDemoSettings = null with get,set
[<AllowNullLiteral>]
type AppConfig() =
///<summary>
///The ID of this endpoint
///</summary>
[<ApiMember(Description="The ID of this endpoint")>]
member val EndpointId:String = null with get,set
///<summary>
///The ID of the account
///</summary>
[<ApiMember(Description="The ID of the account")>]
member val AccountId:String = null with get,set
///<summary>
///The customer ID associated with this user
///</summary>
[<ApiMember(Description="The customer ID associated with this user")>]
member val CustomerId:String = null with get,set
///<summary>
///The access token for use with Twilio Voice
///</summary>
[<ApiMember(Description="The access token for use with Twilio Voice")>]
member val AccessToken:String = null with get,set
///<summary>
///The access token's identity
///</summary>
[<ApiMember(Description="The access token's identity")>]
member val Identity:String = null with get,set
///<summary>
///The email address of the user
///</summary>
[<ApiMember(Description="The email address of the user")>]
member val EmailAddress:String = null with get,set
///<summary>
///The user's information
///</summary>
[<ApiMember(Description="The user's information")>]
member val UserInfo:AppUserInfo = null with get,set
///<summary>
///The agent state (for call center users)
///</summary>
[<ApiMember(Description="The agent state (for call center users)")>]
member val AgentState:AgentStates = new AgentStates() with get,set
///<summary>
///The agent state reason
///</summary>
[<ApiMember(Description="The agent state reason")>]
member val AgentStateReason:AgentStateReasons = new AgentStateReasons() with get,set
///<summary>
///The tabs for the app
///</summary>
[<ApiMember(Description="The tabs for the app")>]
member val Tabs:ResizeArray<Object> = new ResizeArray<Object>() with get,set
///<summary>
///The app settings
///</summary>
[<ApiMember(Description="The app settings")>]
member val AppSettings:AppSettings = null with get,set
///<summary>
///The phone settings for third party connectivity
///</summary>
[<ApiMember(Description="The phone settings for third party connectivity")>]
member val ThirdPartyPhoneSystemSettings:ThirdPartyPhoneSystemSettings = null with get,set
type DeviceTypes =
| Web = 0
| iOS = 1
| Android = 2
[<AllowNullLiteral>]
type GetEndpointAppConfig() =
///<summary>
///The endpoint whose config you want to get (this must be a User)
///</summary>
[<ApiMember(Description="The endpoint whose config you want to get (this must be a User)")>]
member val EndpointId:String = null with get,set
///<summary>
///The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this
///</summary>
[<ApiMember(Description="The endpoint email address whose config you want to get (this must be a User) - EndpointId takes priority over this")>]
member val EndpointEmailAddress:String = null with get,set
///<summary>
///The type of device you are requesting config for
///</summary>
[<ApiMember(Description="The type of device you are requesting config for")>]
member val DeviceType:DeviceTypes = new DeviceTypes() with get,set
///<summary>
///Use a specific push credential SID
///</summary>
[<ApiMember(Description="Use a specific push credential SID")>]
member val PushCredentialSid:String = null with get,set
///<summary>
///Use a specific application SID
///</summary>
[<ApiMember(Description="Use a specific application SID")>]
member val ApplicationSid:String = null with get,set
///<summary>
///Is this device operating in a sandbox environment? IOS only.
///</summary>
[<ApiMember(Description="Is this device operating in a sandbox environment? IOS only.")>]
member val Sandbox:Boolean = new Boolean() with get,set
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: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>