This operation updates an alert.
Request
Syntax
Send the request using either XML or JSON:
-
XML
POST <webservice>/AlertRule/{alertId}/Action/Modify HTTP/1.1 Host: <host name> Accept: application/xml Authtoken: <authentication token> Content-type: application/xml <modify_alerts.xml>
-
JSON
POST <webservice>/AlertRule/{alertId}/Action/Modify HTTP/1.1 Host: <host name> Accept: application/json Authtoken: <authentication token> Content-type: application/json <modify_alerts.json>
where <webservice> is the root path used to route the API requests to the Web Server.
For more information, see Available Web Services for REST API.
Request Parameters
Name |
Description |
Required |
alertId |
The alert ID for the alert. If the alert ID is not known, use the GET Alert API to retrieve it. |
Yes |
Request Headers
Name |
Description |
Host |
The host name of the Web Server or Web Console used in the API request. |
Accept |
The format of the response. Valid values are: application/xml or application/json. |
Authtoken |
The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication. |
Content-type |
The media type contained in the request body. |
Request Body
Download the XML or JSON file required for this request: modify_alerts.xml or modify_alerts.json. The following table displays the parameters for the request body.
Parameter |
Description |
Element |
Parent Element |
||
entityListOperationType |
The operation to perform on the entities associated with the alert. The entities are defined in the elements under the <CVGui_CommCellTreeNode> element. Valid values:
|
alertDetail |
alertDetail |
||
notifTypeListOperationType |
The operation to perform on the notification types associated with the alert. The notification types are defined in the val parameter of the <notifType> element. Valid values:
|
alertDetail |
alertDetail |
||
alertSeverity |
The alert severity. Valid values are:
|
alertDetail |
alertDetail |
||
senderDisplayName |
The display name of the sender of the alert. |
alertDetail |
alertDetail |
||
senderEmailId |
The email address of the sender of the alert. |
alertDetail |
alertDetail |
||
alertType |
The alert type. Valid values are:
|
alertDetail |
alertDetail |
||
_type_ |
The type of entity to associate with the alert. Use the _type_ parameter to associate a group of entities or individual entities. For example,
To associate all entities of a specific type, the valid values are:
|
associations |
CVGui_CommCellTreeNode |
||
ID of the entity |
The system-generated ID of the entity in the _type_ parameter in the <associations> element. For example, if _type_="3", then the clientId parameter is included in the <associations> element: |
associations |
CVGui_CommCellTreeNode |
||
Name of the entity |
The name of the entity in the _type_ parameter in the <associations> element. For example, if _type_="3", then the clientName parameter is included in the <associations> element: |
associations |
CVGui_CommCellTreeNode |
||
exclude |
The option to exclude the entity defined in the <associations> element. In the following example, all clients except client001 are associated with the alert:
Valid value is 1. If there are no entities to exclude, remove the <flag> element from the XML. |
flags |
associations |
||
alertName |
The name of the alert. |
alertrule |
alertDetail |
||
alertId |
The system-generated ID assigned to the alert. |
alertrule |
alertDetail |
||
val |
The notification type for the alert. To add more than one notification type, open the .xml file and add the <notifType> element for each notification type, for example: <notifType val="4"/> Valid values are:
|
notifType |
alertDetail |
||
cmdPath |
The file path to the command processor executable file. |
runCommand (optional) |
alertDetail |
||
arguments |
The argument values. Add quotation marks around each value to resolve potential white space issues, for example: "<DETECTED CRITERIA>" See Available Alert Tokens for a list of tokens or arguments. |
runCommand (optional) |
alertDetail |
||
userName |
The userName of the user who has permissions to modify the alert. |
credentials |
runCommand (optional) |
||
password |
The password of the user who has permissions to modify the alert. |
credentials |
runCommand (optional) |
||
domainName |
The domain name of the user who has permissions to modify the alert. |
credentials |
runCommand (optional) |
||
userListOperationType |
The operation to perform on the users who receive the alert notification. Valid values:
|
userList |
alertDetail |
||
_type_ |
Valid value is 13. |
userList |
userList |
||
userName |
The name of the user who receives the alert notification. |
userList |
userList |
||
userId |
The system-generated ID assigned to the user. |
userList |
userList |
||
userGroupListOperationType |
The operation to perform on the user groups that receive the alert notification. Valid values:
|
userGroupList |
alertDetail |
||
_type_ |
Valid value is 15. |
userGroupList |
userGroupList |
||
userGroupName |
The name of the user group that receives the alert notification. |
userGroupList |
userGroupList |
||
userGroupId |
The system-generated ID assigned to the user group. |
userGroupList |
userGroupList |
||
nonGalaxyUserOperationType |
The operation to perform on the users who receive the alert notification. These users do not have user IDs in the CommServe database. Valid values:
|
regNonGalaxyUserList |
alertDetail |
||
val |
The email address of the user. This user does not have a user ID in the CommServe database. |
nonGalaxyUserList |
regNonGalaxyUserList |
||
val |
The email address of the user who receives email notifications when the alert is escalated. This user does not have a user ID in the CommServe database. |
nonGalaxyUserList |
EscNonGalaxyUserList |
||
nonGalaxyUserOperationType |
The operation to perform on the users who receive the alert notification. These user email addresses are the Cc or Bcc recipients. These users do not have user IDs in the CommServe database. Valid values:
|
nonGalaxyList |
alertDetail |
||
nonGalaxyUser |
The email address of the user. This user email address is the Cc or Bcc recipient. This user does not have a user ID in the CommServe database. |
nonGalaxyUserList |
nonGalaxyList |
||
escalationLevel |
The option to indicate if the Cc or Bcc user email addresses are added to the regular alert notification or the escalated alert notification. These users do not have user IDs in the CommServe database. Valid values are:
|
nonGalaxyUserList |
nonGalaxyList |
||
recipientType |
The option to add the user email address as the Cc or Bcc recipient. These users do not have user IDs in the CommServe database. Valid values are:
|
nonGalaxyUserList |
nonGalaxyList |
||
appTypeFilterOperationType |
This parameter is available for alert types that can be associated with agents. The operation to perform on the agent filters. Valid values are:
|
appTypeFilterList |
alertDetail |
||
_type_ |
Valid value is 79 when the applicationId parameter is used, for example:
|
appTypeFilter |
appTypeFilterList |
||
applicationId |
This parameter is available for alert types that can be associated with agents. Filters the entities in the <associations> element. Valid values are:
|
appTypeFilter |
appTypeFilterList |
||
_type_ |
Valid value is 78 when the appGroupId parameter is used, for example:
|
appTypeFilter |
appTypeFilterList |
||
appGroupId |
This parameter is available for alert types that can be associated with agents. Filters the entities in the <associations> element. Some agent types in the appGroupId parameter represent a group of agents. For example, Valid values are:
|
appTypeFilter |
appTypeFilterList |
||
criteria |
The alert criteria. Valid values are:
|
criteria |
alertDetail |
||
localeID |
locale |
alertDetail |
|||
persistTimeSeconds |
regularOption |
alertDetail |
|||
delayTimeSeconds |
regularOption |
alertDetail |
|||
reportingOptions |
The option to set notification criteria. Valid values are:
|
regularOption |
alertDetail |
||
escalationSeverity |
escalationSeverity |
alertDetail |
Response
Response Parameters
Parameter |
Description |
Element |
---|---|---|
errorCode |
The possible error codes. Valid values are:
|
CVGui_GenericResp |
errorMessage |
The description of the error code. Not all error codes have an error message. |
CVGui_GenericResp |
Examples
Sample Request
POST <webservice>/AlertRule/77/Action/Modify HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<CVGui_AlertRuleModifyReq>
<alertDetail>
<alertDetail alertType="3" senderDisplayName="John Doe" senderEmailId="jdoe@example.com" alertSeverity="0" notifTypeListOperationType="0" entityListOperationType ="0" >
<EntityList>
<CVGui_CommCellTreeNode>
<associations _type_="2" />
</CVGui_CommCellTreeNode>
</EntityList>
<alertrule alertId="77" alertName="Library Management All" />
<notifType val="1" />
<userList userListOperationType ="0">
<userList _type_="" userId="" userName="" />
</userList>
<userGroupList userGroupListOperationType ="0" >
<userGroupList _type_="" userGroupId="" userGroupName="" />
</userGroupList>
<regNonGalaxyUserList nonGalaxyUserOperationType="2">
<nonGalaxyUserList val="jdoe@mycompany.com" />
</regNonGalaxyUserList>
<EscNonGalaxyUserList>
<nonGalaxyUserList val="jdoe@mycompany.com" />
</EscNonGalaxyUserList>
<criteria criteria="22" />
<locale localeID="0" />
</alertDetail>
<regularOption reportingOptions="1" delayTimeSeconds="0" persistTimeSeconds="0" />
<escalationSeverity escalationSeverity="0" />
</alertDetail>
</CVGui_AlertRuleModifyReq>
Sample Response
This is the response when the alert is successfully updated.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><CVGui_GenericResp errorCode="0" errorMessage="AlertRule modified successfully" />
These are the possible responses when the alert ID in the request is not valid.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<CVGui_GenericResp errorMessage="Invalid Rule Id [7s]" errorCode="1" />
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<CVGui_GenericResp errorCode="720899" errorMessage="Alert notification not found" />
This is the response when a user does not have the alert management capability.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><CVGui_GenericResp errorCode="1" errorMessage="Permission denied : User doesn't have enough permission to edit this alert."/>