Package com.thingworx.resources.alerts
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:
-
Field Summary
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AcknowledgeAlert
(String source, String sourceProperty, String message) Service Category: Alerts Service Description: Acknowledge an active alert.void
AcknowledgeAlertFromSummary
(InfoTable alerts, String message) Service Category: Alerts Service Description: Acknowledge an active alert via a summary record.void
DeleteAlertFromSummary
(InfoTable alerts) Service Category: Alerts Service Description: Deletes an alert(s) from the summary record.GetAlertConfigurationForBaseType
(String baseType, String alertType) Service Category: Alerts Service Description: Get the appropriate alert configuration DataShape for a given base type.Service Category: Alerts Service Description: Get the all the appropriate alert information for all the property definition base types.GetAlertTypesForBaseType
(String baseType) Service Category: Alerts Service Description: Get the appropriate alert types given base type.void
PurgeAlertHistory
(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate) Service Category: Maintenance Service Description: Purge the alert history.QueryAlertHistory
(String name, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query, Double maxItems) Service Category: Queries Service Description: Query the alert history.QueryAlertSummary
(org.json.JSONObject query, Boolean onlyAcknowledged, Boolean onlyUnacknowledged, Double maxItems) Service Category: Queries Service Description: Query the alert summary.QueryAlertSummaryForThing
(String name, Boolean onlyAcknowledged, Boolean onlyUnacknowledged, org.json.JSONObject query, String property, Double maxItems) Service Category: Queries Service Description: Query the alert summary for a specific thing.Methods inherited from class com.thingworx.resources.Resource
getEntityType
Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequest
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies, validateConfiguration
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription, getName
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
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 - QUERYonlyAcknowledged
- Show only acknowledged alerts - BOOLEANonlyUnacknowledged
- Show only unacknowledged alerts - BOOLEANmaxItems
- 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 - THINGNAMEonlyAcknowledged
- Show only acknowledged alerts - BOOLEANonlyUnacknowledged
- Show only unacknowledged alerts - BOOLEANquery
- Query definition - QUERYproperty
- Property name - STRINGmaxItems
- 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 - BASETYPENAMEalertType
- 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 - THINGNAMEstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERYmaxItems
- 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 - DATETIMEendDate
- 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 - STRINGsourceProperty
- Source property - STRINGmessage
- 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 - INFOTABLEmessage
- 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
-