Evo Voice

<back to all web services

NewAlert

Creates a new alert

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/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

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
    End Namespace

    Namespace Voice.Api.Alerts

        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
        End Class

        Public Enum AlertTriggers
            CallSpend
        End Enum

        '''<Summary>
        '''Creates a new alert
        '''</Summary>
        <Api(Description:="Creates a new alert")>
        Public Partial Class NewAlert
            Implements IPost
            '''<Summary>
            '''The account ID to associate this alert with
            '''</Summary>
            <ApiMember(Description:="The account ID to associate this alert with")>
            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
        End Class
    End Namespace
End Namespace

VB.NET NewAlert DTOs

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

HTTP + JSV

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

POST /alerts HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	name: String,
	trigger: CallSpend,
	windowHours: 0,
	threshold: 0,
	notificationEmailAddresses: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	name: String,
	trigger: CallSpend,
	windowHours: 0,
	threshold: 0,
	notificationEmailAddresses: String,
	id: String,
	dateCreated: String,
	dateLastModified: String,
	createdBy: String,
	lastModifiedBy: String
}