ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Disable/enable a notification using REST

book

Article ID: 228222

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

I am trying to disable a notification using REST. Is this possible?

I want to change

<Enabled>N</Enabled>

to

<Enabled>Y</Enabled>

Environment

Release : 20.2

Component : IM Reporting / Admin / Configuration

Resolution

1. Find the ID of the notification it is at the end of the notification data in rest. 
 a. Go to http://PC:8281/EventManager/webservice/notifications
 b. Find your notification name <Name>test_disable</Name> (test_disable is the notification name for the test) 
 c. Just under that <Name> is the <ID> number. 

2. Do a get using that <ID> from http://PC:8281/EventManager/webservice/notifications/<ID>

3. Take all the output and remove the lines for <ID>, <TenantName> and <UserName> and change <Enabled>Y</Enabled> to <Enabled>N</Enabled>.

4. Do a put of that modifies output to http://PC:8281/EventManager/webservice/notifications/<ID>

Additional Information

You can also do a put of the .xml using the CURL on the command line

Example where the modified xml is in the file notification.xml: 

curl -v -X PUT -H "Content-Type: application/xml" http://<PC>:8281/EventManager/webservice/notifications/1 -d @"/<PATH>/notification.xml"