NotificationRuleTemplate GetNotificationRuleTemplatesQuery
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
NotificationRuleTemplate GetNotificationRuleTemplatesQuery
Retrieve Notification rule templates based on the specified conditions. Returns Notification rule templates using the specified search query string.
Request
GET notificationruletemplates/search
URL Parameters
-
databaseWebId The ID of the asset database to use as the root of the query. See WebID for more information.
-
query The query string is a list of filters used to perform an AFSearch for the Notification rule templates in the asset database. An example would be: "query=NotificationRuleTemplate:{ Name:='MyNotificationRuleTemplate' } Type:=Int32". See Search Query Syntax for more information.See URL Encoding for more information.
-
startIndex The starting index (zero based) of the items to be returned. The default is 0.
-
maxCount The maximum number of objects to be returned per call (page size). The default is 1000.
-
selectedFields List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned. See Selected Fields for more information.
-
webIdType Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType". See WebID Type for more information.
Status Codes
200: A list of notification rule templates matching the specified conditions.
Sample Response Body
{
"Items": [
{
"WebId": "I1NTDqD5loBNH0erqeqJodtALAtdcX5JH_5xGEKAAVXTSaAg",
"Id": "e9a984d0-f47c-11e7-8454-00155d029708",
"Name": "MachineName",
"Description": "Description entered by the user",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\ElementTemplates[Template3]\\NotificationRuleTemplates[Notification Rule Template]",
"CategoryNames": [
"MachineNameAlerts"
],
"Criteria": "Name: EventFrameCriteriaName",
"MultiTriggerEventOption": "HighestSeverity",
"NonrepetitionInterval": "PT3S",
"ResendInterval": "PT5S",
"Status": "Functioning",
"TemplateName": "MachineName Notification Rule Template",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/notificationruletemplates/I1NTDqD5loBNH0erqeqJodtALAtdcX5JH_5xGEKAAVXTSaAg"
}
},
{
"WebId": "I1NTDqD5loBNH0erqeqJodtALAtdcX5JH_5xGEKAAVXTSaAg",
"Id": "e9a984d0-f47c-11e7-8454-00155d029708",
"Name": "MachineName",
"Description": "Description entered by the user",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\ElementTemplates[Template3]\\NotificationRuleTemplates[Notification Rule Template]",
"CategoryNames": [
"MachineNameAlerts"
],
"Criteria": "Name: EventFrameCriteriaName",
"MultiTriggerEventOption": "HighestSeverity",
"NonrepetitionInterval": "PT3S",
"ResendInterval": "PT5S",
"Status": "Functioning",
"TemplateName": "MachineName Notification Rule Template",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/notificationruletemplates/I1NTDqD5loBNH0erqeqJodtALAtdcX5JH_5xGEKAAVXTSaAg"
}
}
],
"Links": {}
}