Evo Voice

<back to all web services

ListAlerts

Retrieve alerts

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/alerts
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Alerts
Imports Voice.Api
Imports Voice.Api.Accounts

Namespace Global

    Namespace Voice.Api

        Public Partial Class EntityInfo
            '''<Summary>
            '''The ID of the object
            '''</Summary>
            <ApiMember(Description:="The ID of the object")>
            Public Overridable Property Id As String

            '''<Summary>
            '''The date the object was created
            '''</Summary>
            <ApiMember(Description:="The date the object was created")>
            Public Overridable Property DateCreated As String

            '''<Summary>
            '''The date the object was last modified
            '''</Summary>
            <ApiMember(Description:="The date the object was last modified")>
            Public Overridable Property DateLastModified As String

            '''<Summary>
            '''The user that created this object
            '''</Summary>
            <ApiMember(Description:="The user that created this object")>
            Public Overridable Property CreatedBy As String

            '''<Summary>
            '''The user that last modified this object
            '''</Summary>
            <ApiMember(Description:="The user that last modified this object")>
            Public Overridable Property LastModifiedBy As String
        End Class

        Public Partial Class ListRequest(Of T)
            Implements IGet
            '''<Summary>
            '''The page of data to retrieve
            '''</Summary>
            <ApiMember(Description:="The page of data to retrieve")>
            Public Overridable Property Page As Integer

            '''<Summary>
            '''If you want all objects to be returned. This should be used with care
            '''</Summary>
            <ApiMember(Description:="If you want all objects to be returned. This should be used with care")>
            Public Overridable Property All As Boolean

            '''<Summary>
            '''The number per page to retrieve
            '''</Summary>
            <ApiMember(Description:="The number per page to retrieve")>
            Public Overridable Property CountPerPage As Integer

            '''<Summary>
            '''Specific IDs
            '''</Summary>
            <ApiMember(Description:="Specific IDs")>
            Public Overridable Property SpecificIds As List(Of String)

            '''<Summary>
            '''Specify a sort field
            '''</Summary>
            <ApiMember(Description:="Specify a sort field")>
            Public Overridable Property SortField As String

            '''<Summary>
            '''Specify a sort order
            '''</Summary>
            <ApiMember(Description:="Specify a sort order")>
            Public Overridable Property SortOrder As SortOrders

            '''<Summary>
            '''Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
            '''</Summary>
            <ApiMember(Description:="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")>
            Public Overridable Property SimplifiedPaging As Boolean
        End Class

        Public Partial Class ListResponse(Of T)
            '''<Summary>
            '''The items
            '''</Summary>
            <ApiMember(Description:="The items")>
            Public Overridable Property Items As List(Of AccountInfo)

            '''<Summary>
            '''The total number of items
            '''</Summary>
            <ApiMember(Description:="The total number of items")>
            Public Overridable Property TotalCount As Integer

            '''<Summary>
            '''The total number of pages
            '''</Summary>
            <ApiMember(Description:="The total number of pages")>
            Public Overridable Property TotalPages As Integer

            '''<Summary>
            '''Are there more pages of items? Used with simplified paging
            '''</Summary>
            <ApiMember(Description:="Are there more pages of items? Used with simplified paging")>
            Public Overridable Property HasMorePages As Boolean
        End Class

        Public Enum SortOrders
            Ascend
            Descend
        End Enum
    End Namespace

    Namespace Voice.Api.Accounts

        Public Partial Class AccountInfo
            Inherits EntityInfo
            '''<Summary>
            '''The name of this account
            '''</Summary>
            <ApiMember(Description:="The name of this account")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The ID of this account's parent
            '''</Summary>
            <ApiMember(Description:="The ID of this account's parent")>
            Public Overridable Property ParentAccountId As String

            '''<Summary>
            '''The twilio account SID
            '''</Summary>
            <ApiMember(Description:="The twilio account SID")>
            Public Overridable Property TwilioAccountSid As String

            '''<Summary>
            '''The ancestors of this account. Useful for breadcrumbs
            '''</Summary>
            <ApiMember(Description:="The ancestors of this account. Useful for breadcrumbs")>
            Public Overridable Property AncestorIds As List(Of String)

            '''<Summary>
            '''The max number of phone numbers this account can have
            '''</Summary>
            <ApiMember(Description:="The max number of phone numbers this account can have")>
            Public Overridable Property MaxPhoneNumbers As Integer

            '''<Summary>
            '''This account is BYOA
            '''</Summary>
            <ApiMember(Description:="This account is BYOA")>
            Public Overridable Property IsBYOA As Boolean

            '''<Summary>
            '''TrustHub Profile Sid
            '''</Summary>
            <ApiMember(Description:="TrustHub Profile Sid")>
            Public Overridable Property TrustHubProfileSid As String

            '''<Summary>
            '''The ID of the logo file
            '''</Summary>
            <ApiMember(Description:="The ID of the logo file")>
            Public Overridable Property LogoId As String

            '''<Summary>
            '''The URI of the logo file
            '''</Summary>
            <ApiMember(Description:="The URI of the logo file")>
            Public Overridable Property LogoUri As String

            '''<Summary>
            '''The billing settings for this account
            '''</Summary>
            <ApiMember(Description:="The billing settings for this account")>
            Public Overridable Property BillingSettings As BillingSettings

            '''<Summary>
            '''Enable international settings for the account?
            '''</Summary>
            <ApiMember(Description:="Enable international settings for the account?")>
            Public Overridable Property EnableInternationalSettings As Boolean

            '''<Summary>
            '''The default list of country codes the account can dial when not specified on customer
            '''</Summary>
            <ApiMember(Description:="The default list of country codes the account can dial when not specified on customer")>
            Public Overridable Property DefaultInternationalCountryCodes As List(Of String)
        End Class

        Public Partial Class BillingItem
            Public Overridable Property BaseCost As Double
            Public Overridable Property RawUnitMultiplier As Double
            Public Overridable Property UnitCost As Double
            Public Overridable Property Allowance As Integer
        End Class

        Public Partial Class BillingSettings
            Public Overridable Property Base As BillingItem
            Public Overridable Property LocalNumbers As BillingItem
            Public Overridable Property TollFreeNumbers As BillingItem
            Public Overridable Property InboundVoiceCalls As BillingItem
            Public Overridable Property OutboundVoiceCalls As BillingItem
            Public Overridable Property InboundFaxes As BillingItem
            Public Overridable Property OutboundFaxes As BillingItem
            Public Overridable Property InboundSmsMessages As BillingItem
            Public Overridable Property OutboundSmsMessages As BillingItem
            Public Overridable Property AIInsights As BillingItem
            Public Overridable Property AILiveMinutes As BillingItem
            Public Overridable Property AIMessages As BillingItem
            Public Overridable Property AITranscriptions As BillingItem
        End Class
    End Namespace

    Namespace Voice.Api.Alerts

        Public Enum AlertCustomerSelection
            AllCustomers
            ExcludeCustomers
            IncludeCustomers
        End Enum

        Public Partial Class AlertInfo
            Inherits EntityInfo
            '''<Summary>
            '''The ID of the account associated with this alert
            '''</Summary>
            <ApiMember(Description:="The ID of the account associated with this alert")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The name of the alert
            '''</Summary>
            <ApiMember(Description:="The name of the alert")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The trigger alert
            '''</Summary>
            <ApiMember(Description:="The trigger alert")>
            Public Overridable Property Trigger As AlertTriggers

            '''<Summary>
            '''The number of hours for the window over which the alert will trigger
            '''</Summary>
            <ApiMember(Description:="The number of hours for the window over which the alert will trigger")>
            Public Overridable Property WindowHours As Double

            '''<Summary>
            '''The value at which the alert will trigger
            '''</Summary>
            <ApiMember(Description:="The value at which the alert will trigger")>
            Public Overridable Property Threshold As Double

            '''<Summary>
            '''The email addresses (one per line) to notify
            '''</Summary>
            <ApiMember(Description:="The email addresses (one per line) to notify")>
            Public Overridable Property NotificationEmailAddresses As String

            '''<Summary>
            '''Customer selection for this alert
            '''</Summary>
            <ApiMember(Description:="Customer selection for this alert")>
            Public Overridable Property CustomerSelection As AlertCustomerSelection

            '''<Summary>
            '''The list of customer IDs for the selection model
            '''</Summary>
            <ApiMember(Description:="The list of customer IDs for the selection model")>
            Public Overridable Property CustomerIds As List(Of String)
        End Class

        Public Enum AlertTriggers
            CallSpend
            CallCount
        End Enum

        '''<Summary>
        '''Retrieve alerts
        '''</Summary>
        <Api(Description:="Retrieve alerts")>
        Public Partial Class ListAlerts
            Inherits ListRequest(Of AlertInfo)
            '''<Summary>
            '''Filter by accounts
            '''</Summary>
            <ApiMember(Description:="Filter by accounts")>
            Public Overridable Property AccountIds As List(Of String)

            '''<Summary>
            '''Filter by name
            '''</Summary>
            <ApiMember(Description:="Filter by name")>
            Public Overridable Property NameFilter As String
        End Class
    End Namespace
End Namespace

VB.NET ListAlerts DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /alerts HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ListResponseOfAlertInfoLEzmHoIb xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">
  <HasMorePages>false</HasMorePages>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Alerts">
    <d2p1:AlertInfo>
      <CreatedBy>String</CreatedBy>
      <DateCreated>String</DateCreated>
      <DateLastModified>String</DateLastModified>
      <Id>String</Id>
      <LastModifiedBy>String</LastModifiedBy>
      <d2p1:AccountId>String</d2p1:AccountId>
      <d2p1:CustomerIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:CustomerIds>
      <d2p1:CustomerSelection>AllCustomers</d2p1:CustomerSelection>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:NotificationEmailAddresses>String</d2p1:NotificationEmailAddresses>
      <d2p1:Threshold>0</d2p1:Threshold>
      <d2p1:Trigger>CallSpend</d2p1:Trigger>
      <d2p1:WindowHours>0</d2p1:WindowHours>
    </d2p1:AlertInfo>
  </Items>
  <TotalCount>0</TotalCount>
  <TotalPages>0</TotalPages>
</ListResponseOfAlertInfoLEzmHoIb>