Evo Voice

<back to all web services

PatchAlert

Update a specific alert

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
PATCH/alerts/{alertId}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Update a specific alert
    */
    @Api(Description="Update a specific alert")
    public static class PatchAlert implements IPatch
    {
        /**
        * The ID of the alert you want to update
        */
        @ApiMember(Description="The ID of the alert you want to update")
        public String alertId = null;

        /**
        * The name for the alert
        */
        @ApiMember(Description="The name for the alert")
        public String name = null;

        /**
        * The trigger alert
        */
        @ApiMember(Description="The trigger alert")
        public AlertTriggers trigger = null;

        /**
        * The number of hours for the window over which the alert will trigger
        */
        @ApiMember(Description="The number of hours for the window over which the alert will trigger")
        public Double windowHours = null;

        /**
        * The value at which the alert will trigger
        */
        @ApiMember(Description="The value at which the alert will trigger")
        public Double threshold = null;

        /**
        * The email addresses (one per line) to notify
        */
        @ApiMember(Description="The email addresses (one per line) to notify")
        public String notificationEmailAddresses = null;
        
        public String getAlertId() { return alertId; }
        public PatchAlert setAlertId(String value) { this.alertId = value; return this; }
        public String getName() { return name; }
        public PatchAlert setName(String value) { this.name = value; return this; }
        public AlertTriggers getTrigger() { return trigger; }
        public PatchAlert setTrigger(AlertTriggers value) { this.trigger = value; return this; }
        public Double getWindowHours() { return windowHours; }
        public PatchAlert setWindowHours(Double value) { this.windowHours = value; return this; }
        public Double getThreshold() { return threshold; }
        public PatchAlert setThreshold(Double value) { this.threshold = value; return this; }
        public String getNotificationEmailAddresses() { return notificationEmailAddresses; }
        public PatchAlert setNotificationEmailAddresses(String value) { this.notificationEmailAddresses = value; return this; }
    }

    public static enum AlertTriggers
    {
        CallSpend;
    }

    public static class AlertInfo extends EntityInfo
    {
        /**
        * The ID of the account associated with this alert
        */
        @ApiMember(Description="The ID of the account associated with this alert")
        public String accountId = null;

        /**
        * The name of the alert
        */
        @ApiMember(Description="The name of the alert")
        public String name = null;

        /**
        * The trigger alert
        */
        @ApiMember(Description="The trigger alert")
        public AlertTriggers trigger = null;

        /**
        * The number of hours for the window over which the alert will trigger
        */
        @ApiMember(Description="The number of hours for the window over which the alert will trigger")
        public Double windowHours = null;

        /**
        * The value at which the alert will trigger
        */
        @ApiMember(Description="The value at which the alert will trigger")
        public Double threshold = null;

        /**
        * The email addresses (one per line) to notify
        */
        @ApiMember(Description="The email addresses (one per line) to notify")
        public String notificationEmailAddresses = null;
        
        public String getAccountId() { return accountId; }
        public AlertInfo setAccountId(String value) { this.accountId = value; return this; }
        public String getName() { return name; }
        public AlertInfo setName(String value) { this.name = value; return this; }
        public AlertTriggers getTrigger() { return trigger; }
        public AlertInfo setTrigger(AlertTriggers value) { this.trigger = value; return this; }
        public Double getWindowHours() { return windowHours; }
        public AlertInfo setWindowHours(Double value) { this.windowHours = value; return this; }
        public Double getThreshold() { return threshold; }
        public AlertInfo setThreshold(Double value) { this.threshold = value; return this; }
        public String getNotificationEmailAddresses() { return notificationEmailAddresses; }
        public AlertInfo setNotificationEmailAddresses(String value) { this.notificationEmailAddresses = value; return this; }
    }

    public static class EntityInfo
    {
        /**
        * The ID of the object
        */
        @ApiMember(Description="The ID of the object")
        public String id = null;

        /**
        * The date the object was created
        */
        @ApiMember(Description="The date the object was created")
        public String dateCreated = null;

        /**
        * The date the object was last modified
        */
        @ApiMember(Description="The date the object was last modified")
        public String dateLastModified = null;

        /**
        * The user that created this object
        */
        @ApiMember(Description="The user that created this object")
        public String createdBy = null;

        /**
        * The user that last modified this object
        */
        @ApiMember(Description="The user that last modified this object")
        public String lastModifiedBy = null;
        
        public String getId() { return id; }
        public EntityInfo setId(String value) { this.id = value; return this; }
        public String getDateCreated() { return dateCreated; }
        public EntityInfo setDateCreated(String value) { this.dateCreated = value; return this; }
        public String getDateLastModified() { return dateLastModified; }
        public EntityInfo setDateLastModified(String value) { this.dateLastModified = value; return this; }
        public String getCreatedBy() { return createdBy; }
        public EntityInfo setCreatedBy(String value) { this.createdBy = value; return this; }
        public String getLastModifiedBy() { return lastModifiedBy; }
        public EntityInfo setLastModifiedBy(String value) { this.lastModifiedBy = value; return this; }
    }

}

Java PatchAlert DTOs

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

HTTP + OTHER

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

PATCH /alerts/{alertId} HTTP/1.1 
Host: evovoice.io 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"alertId":"String","name":"String","trigger":"CallSpend","windowHours":0,"threshold":0,"notificationEmailAddresses":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}