| Requires any of the roles: | SystemAdministrator, Manager, Customer |
| GET | /alerts/{alertId} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Get a specific alert
*/
@Api(Description="Get a specific alert")
public static class GetAlert implements IGet
{
/**
* The ID of the alert you want to get
*/
@ApiMember(Description="The ID of the alert you want to get")
public String alertId = null;
public String getAlertId() { return alertId; }
public GetAlert setAlertId(String value) { this.alertId = value; return this; }
}
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; }
}
public static enum AlertTriggers
{
CallSpend;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /alerts/{alertId} HTTP/1.1
Host: evovoice.io
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}