NotificationRule GetNotificationRulesQuery
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
NotificationRule GetNotificationRulesQuery
Retrieve notification rules based on the specified conditions. Returns notification rules using the specified search query string.
Request
GET notificationrules/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 rules in the asset database. An example would be: "query=Name:=MyNotificationRule* Template:=NoteRuleTemplate". 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 rules matching the specified conditions.
Sample Response Body
{
"Items": [
{
"WebId": "I1NRDqD5loBNH0erqeqJodtALA5bYfWno26BGgMQAVXYR0Ag",
"Id": "e9a984d0-f47c-11e7-8454-00155d029708",
"Name": "MachineName",
"Description": "Manufacturing Equipment MachineName",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName\\NotificationRules[RuleName]",
"AutoCreated": true,
"CategoryNames": [
"Equipment Assets"
],
"Criteria": "Name: EventFrameCriteriaName",
"MultiTriggerEventOption": "HighestSeverity",
"NonrepetitionInterval": "PT3S",
"ResendInterval": "PT5S",
"Status": "Disabled",
"TemplateName": "MachineName Notification Rule",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/notificationrules/I1NRDqD5loBNH0erqeqJodtALA5bYfWno26BGgMQAVXYR0Ag"
}
},
{
"WebId": "I1NRDqD5loBNH0erqeqJodtALA5bYfWno26BGgMQAVXYR0Ag",
"Id": "e9a984d0-f47c-11e7-8454-00155d029708",
"Name": "MachineName",
"Description": "Manufacturing Equipment MachineName",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName\\NotificationRules[RuleName]",
"AutoCreated": true,
"CategoryNames": [
"Equipment Assets"
],
"Criteria": "Name: EventFrameCriteriaName",
"MultiTriggerEventOption": "HighestSeverity",
"NonrepetitionInterval": "PT3S",
"ResendInterval": "PT5S",
"Status": "Disabled",
"TemplateName": "MachineName Notification Rule",
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/notificationrules/I1NRDqD5loBNH0erqeqJodtALA5bYfWno26BGgMQAVXYR0Ag"
}
}
],
"Links": {}
}