Class AlertServices

    • Constructor Detail

      • AlertServices

        public AlertServices()
    • Method Detail

      • QueryAlertSummary

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable QueryAlertSummary​(org.json.JSONObject query,
                                           java.lang.Boolean onlyAcknowledged,
                                           java.lang.Boolean onlyUnacknowledged,
                                           java.lang.Double maxItems)
                                    throws java.lang.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:
        java.lang.Exception - If an error occurs
      • QueryAlertSummaryForThing

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable QueryAlertSummaryForThing​(java.lang.String name,
                                                   java.lang.Boolean onlyAcknowledged,
                                                   java.lang.Boolean onlyUnacknowledged,
                                                   org.json.JSONObject query,
                                                   java.lang.String property,
                                                   java.lang.Double maxItems)
                                            throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetAlertConfigurationForBaseType

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetAlertConfigurationForBaseType​(java.lang.String baseType,
                                                          java.lang.String alertType)
                                                   throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetAlertTypesForBaseType

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetAlertTypesForBaseType​(java.lang.String baseType)
                                           throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetAlertConfigurationInfo

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetAlertConfigurationInfo()
                                            throws java.lang.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:
        java.lang.Exception - If an error occurs
      • QueryAlertHistory

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable QueryAlertHistory​(java.lang.String name,
                                           org.joda.time.DateTime startDate,
                                           org.joda.time.DateTime endDate,
                                           java.lang.Boolean oldestFirst,
                                           org.json.JSONObject query,
                                           java.lang.Double maxItems)
                                    throws java.lang.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:
        java.lang.Exception - If an error occurs
      • PurgeAlertHistory

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

        @ThingworxExtensionApiMethod(since={6,6})
        public void AcknowledgeAlert​(java.lang.String source,
                                     java.lang.String sourceProperty,
                                     java.lang.String message)
                              throws java.lang.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:
        java.lang.Exception - If an error occurs
      • AcknowledgeAlertFromSummary

        @ThingworxExtensionApiMethod(since={6,6})
        public void AcknowledgeAlertFromSummary​(InfoTable alerts,
                                                java.lang.String message)
                                         throws java.lang.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:
        java.lang.Exception - If an error occurs
      • DeleteAlertFromSummary

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