Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /endpoints/app/config |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.Endpoints;
using Voice.Api.App;
using Voice.Api.Customers;
namespace Voice.Api.App
{
public partial class AppConfig
{
public AppConfig()
{
Tabs = new List<Object>{};
}
///<summary>
///The ID of this endpoint
///</summary>
[ApiMember(Description="The ID of this endpoint")]
public virtual string EndpointId { get; set; }
///<summary>
///The ID of the account
///</summary>
[ApiMember(Description="The ID of the account")]
public virtual string AccountId { get; set; }
///<summary>
///The customer ID associated with this user
///</summary>
[ApiMember(Description="The customer ID associated with this user")]
public virtual string CustomerId { get; set; }
///<summary>
///The access token for use with Twilio Voice
///</summary>
[ApiMember(Description="The access token for use with Twilio Voice")]
public virtual string AccessToken { get; set; }
///<summary>
///The access token's identity
///</summary>
[ApiMember(Description="The access token's identity")]
public virtual string Identity { get; set; }
///<summary>
///The email address of the user
///</summary>
[ApiMember(Description="The email address of the user")]
public virtual string EmailAddress { get; set; }
///<summary>
///The user's information
///</summary>
[ApiMember(Description="The user's information")]
public virtual AppUserInfo UserInfo { get; set; }
///<summary>
///The agent state (for call center users)
///</summary>
[ApiMember(Description="The agent state (for call center users)")]
public virtual AgentStates AgentState { get; set; }
///<summary>
///The agent state reason
///</summary>
[ApiMember(Description="The agent state reason")]
public virtual AgentStateReasons AgentStateReason { get; set; }
///<summary>
///The tabs for the app
///</summary>
[ApiMember(Description="The tabs for the app")]
public virtual List<Object> Tabs { get; set; }
///<summary>
///The app settings
///</summary>
[ApiMember(Description="The app settings")]
public virtual AppSettings AppSettings { get; set; }
///<summary>
///The phone settings for third party connectivity
///</summary>
[ApiMember(Description="The phone settings for third party connectivity")]
public virtual ThirdPartyPhoneSystemSettings ThirdPartyPhoneSystemSettings { get; set; }
}
public partial class AppUserInfo
{
///<summary>
///The user's first name
///</summary>
[ApiMember(Description="The user's first name")]
public virtual string FirstName { get; set; }
///<summary>
///The user's last name
///</summary>
[ApiMember(Description="The user's last name")]
public virtual string LastName { get; set; }
///<summary>
///Shortcut to the user's full name
///</summary>
[ApiMember(Description="Shortcut to the user's full name")]
public virtual string Name { get; set; }
///<summary>
///The URL to the user's avatar
///</summary>
[ApiMember(Description="The URL to the user's avatar")]
public virtual string AvatarUrl { get; set; }
}
public enum DeviceTypes
{
Web,
iOS,
Android,
}
}
namespace Voice.Api.Customers
{
public partial class AppSettings
{
public virtual bool EnablePhoneNumberManagement { get; set; }
public virtual bool EnableDeviceManagement { get; set; }
public virtual bool EnableDialer { get; set; }
public virtual bool EnableCallHistory { get; set; }
public virtual bool ShowFileNameInMessageCenter { get; set; }
public virtual string ChakraTheme { get; set; }
public virtual string CustomCss { get; set; }
public virtual string PageTitle { get; set; }
public virtual string StringMappings { get; set; }
public virtual string LogoutUrl { get; set; }
public virtual string PortMyNumberUrl { get; set; }
}
}
namespace Voice.Api.Endpoints
{
public enum AgentStateReasons
{
Unknown,
SetByUser,
MissedCall,
SetBySystem,
}
public enum AgentStates
{
Unknown,
Ready,
NotReady,
LoggedOut,
WrapUp,
Outgoing,
Other,
}
public partial class 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)")]
public virtual string EndpointId { 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")]
public virtual string EndpointEmailAddress { get; set; }
///<summary>
///The type of device you are requesting config for
///</summary>
[ApiMember(Description="The type of device you are requesting config for")]
public virtual DeviceTypes DeviceType { get; set; }
///<summary>
///Use a specific push credential SID
///</summary>
[ApiMember(Description="Use a specific push credential SID")]
public virtual string PushCredentialSid { get; set; }
///<summary>
///Use a specific application SID
///</summary>
[ApiMember(Description="Use a specific application SID")]
public virtual string ApplicationSid { 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.")]
public virtual bool Sandbox { get; set; }
}
public partial class ThirdPartyPhoneSystemSettings
{
public virtual ThirdPartyPhoneSystemTypes Type { get; set; }
public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings SipSettings { get; set; }
public virtual ThirdPartyPhoneSystemSettings.ThirdPartyDemoSettings DemoSettings { get; set; }
public partial class ThirdPartyDemoSettings
{
public virtual string Extension { get; set; }
}
public partial class ThirdPartySipSettings
{
public ThirdPartySipSettings()
{
Accounts = new List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings>{};
}
public virtual List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings> Accounts { get; set; }
public enum TransportTypes
{
UDP,
TLS,
TCP,
PERS,
}
public enum 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,
}
public enum DtmfMethods
{
RFC2833,
INFO,
}
public partial class ThirdPartySipAccountSettings
{
public ThirdPartySipAccountSettings()
{
AudioCodecs = new List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes>{};
}
public virtual string Number { get; set; }
public virtual string Agent { get; set; }
public virtual string AuthName { get; set; }
public virtual string UserName { get; set; }
public virtual string DisplayName { get; set; }
public virtual string Password { get; set; }
public virtual string UserDomain { get; set; }
public virtual int RegistrationExpires { get; set; }
public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.TransportTypes TransportType { get; set; }
public virtual string LocalIP { get; set; }
public virtual int LocalPort { get; set; }
public virtual string SipServer { get; set; }
public virtual int SipServerPort { get; set; }
public virtual string OutboundServer { get; set; }
public virtual int OutboundServerPort { get; set; }
public virtual string StunServer { get; set; }
public virtual int StunPort { get; set; }
public virtual string AudioPlaybackDeviceName { get; set; }
public virtual string AudioRecordingDeviceName { get; set; }
public virtual List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes> AudioCodecs { get; set; }
public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.DtmfMethods DTMFMethod { get; set; }
}
}
}
public enum ThirdPartyPhoneSystemTypes
{
Demo,
Sip,
}
}
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>