Class AlertServices

All Implemented Interfaces:
IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAvatar, IEntityLifeCycleEvent, IPersistable, IServiceProvider, ITaggableObject, IDependencyScannableObject, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class AlertServices extends Resource
See Also:
  • Constructor Details

    • AlertServices

      public AlertServices()
  • Method Details

    • QueryAlertSummary

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryAlertSummary(org.json.JSONObject query, Boolean onlyAcknowledged, Boolean onlyUnacknowledged, Double maxItems) throws Exception
      Service Category:
      Queries
      Service Description:
      Query the alert summary.
      Parameters:
      query - Query definition - QUERY
      onlyAcknowledged - Show only acknowledged alerts - BOOLEAN
      onlyUnacknowledged - Show only unacknowledged alerts - BOOLEAN
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Alert Summary - INFOTABLE - Aspects {dataShape:AlertSummary}
      Throws:
      Exception - If an error occurs
    • QueryAlertSummaryForThing

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryAlertSummaryForThing(String name, Boolean onlyAcknowledged, Boolean onlyUnacknowledged, org.json.JSONObject query, String property, Double maxItems) throws Exception
      Service Category:
      Queries
      Service Description:
      Query the alert summary for a specific thing.
      Parameters:
      name - Thing name - THINGNAME
      onlyAcknowledged - Show only acknowledged alerts - BOOLEAN
      onlyUnacknowledged - Show only unacknowledged alerts - BOOLEAN
      query - Query definition - QUERY
      property - Property name - STRING
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Alert Summary - INFOTABLE - Aspects {dataShape:AlertSummary}
      Throws:
      Exception - If an error occurs
    • GetAlertConfigurationForBaseType

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertConfigurationForBaseType(String baseType, String alertType) throws Exception
      Service Category:
      Alerts
      Service Description:
      Get the appropriate alert configuration DataShape for a given base type.
      Parameters:
      baseType - Base type - BASETYPENAME
      alertType - Alert type - STRING
      Returns:
      result Alert Summary - INFOTABLE
      Throws:
      Exception - If an error occurs
    • GetAlertTypesForBaseType

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertTypesForBaseType(String baseType) throws Exception
      Service Category:
      Alerts
      Service Description:
      Get the appropriate alert types given base type.
      Parameters:
      baseType - Base type - BASETYPENAME
      Returns:
      result Alert Summary - INFOTABLE - Aspects {dataShape:EntityList}
      Throws:
      Exception - If an error occurs
    • GetAlertConfigurationInfo

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetAlertConfigurationInfo() throws Exception
      Service Category:
      Alerts
      Service Description:
      Get the all the appropriate alert information for all the property definition base types.
      Returns:
      result Alert Configureation Summary - INFOTABLE
      Throws:
      Exception - If an error occurs
    • QueryAlertHistory

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryAlertHistory(String name, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query, Double maxItems) throws Exception
      Service Category:
      Queries
      Service Description:
      Query the alert history.
      Parameters:
      name - Thing name - THINGNAME
      startDate - Start time - DATETIME
      endDate - End time - DATETIME
      oldestFirst - Search/sort from oldest to newest - BOOLEAN
      query - Query definition - QUERY
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Alert History - INFOTABLE - Aspects {dataShape:AlertHistory, isStreamEntry:true}
      Throws:
      Exception - If an error occurs
    • PurgeAlertHistory

      @ThingworxExtensionApiMethod(since={6,6}) public void PurgeAlertHistory(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate) throws Exception
      Service Category:
      Maintenance
      Service Description:
      Purge the alert history.
      Parameters:
      startDate - Start time - DATETIME
      endDate - End time - DATETIME
      Throws:
      Exception - If an error occurs
    • AcknowledgeAlert

      @ThingworxExtensionApiMethod(since={6,6}) public void AcknowledgeAlert(String source, String sourceProperty, String message) throws Exception
      Service Category:
      Alerts
      Service Description:
      Acknowledge an active alert.
      Parameters:
      source - Source thing - STRING
      sourceProperty - Source property - STRING
      message - Alert message (optional) - STRING
      Throws:
      Exception - If an error occurs
    • AcknowledgeAlertFromSummary

      @ThingworxExtensionApiMethod(since={6,6}) public void AcknowledgeAlertFromSummary(InfoTable alerts, String message) throws Exception
      Service Category:
      Alerts
      Service Description:
      Acknowledge an active alert via a summary record.
      Parameters:
      alerts - Alerts to acknowledge - INFOTABLE
      message - Alert message (optional) - STRING
      Throws:
      Exception - If an error occurs
    • DeleteAlertFromSummary

      @ThingworxExtensionApiMethod(since={7,3}) public void DeleteAlertFromSummary(InfoTable alerts) throws Exception
      Service Category:
      Alerts
      Service Description:
      Deletes an alert(s) from the summary record.
      Parameters:
      alerts - Alerts to delete - INFOTABLE
      Throws:
      Exception - If an error occurs