Close Alerts by using doAction
You can now close Alerts by using the doAction endpoint in CRA. The following procedure describes how to close Alerts using Swagger as example, but you can also close Alerts using endpoint directly.
To close Alerts
Log in to CRA in Swagger and generate a token. For more information, see Using Swagger to access the BMC Common REST API.
- Under Views, open data (/serviceGateway/services/products/{productName}/views/{viewName}/data). Specify values in the following fields:
Field name Value product MVALERT select ALERTS close N - Delete null from the fields that you don’t want to specify. Click Execute.
- From the Response body, copy the Alert key from the ALREAKEY field for the Alert that you want to close.
- In the filter field, enter ALREAKEY= “alertKey”. Click Execute.
- From the Response body, copy the following information:
- Session token from the session field
- The Alert queue name from the ALREQNAM field for the Alert that you want to close
- Under Actions, open doAction (/serviceGateway/services/doAction). Specify values in the following fields:
Field name Value action AlertRsp (case-sensitive) product MVALERT rowNum 1 parms ‘ ‘ ‘alertQueueName’
Enter the Alert queue name that you copied from ALREQNAM in getData
session Enter the session token that you copied from session in getData - Click Execute.
The Alert is now closed.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*