Create, Update, Delete Notification/alarm using EDAA API.
search cancel

Create, Update, Delete Notification/alarm using EDAA API.

book

Article ID: 378357

calendar_today

Updated On:

Products

VMware Smart Assurance VMware Telco Cloud Service Assurance

Issue/Introduction

SAM/MnR/TCSA: How to create, update, delete notification using EDAA API?

Environment

Smarts-10.1.x

MnR/Watch4Net-7.x

TCSA-2.x

Resolution

API action can be performed using Curl or any third party tool like POSTMAN.

All actions are demonstrated below using POSTMAN tool.

 

  • Create Notification:

Perform POST as http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_NotificationFactory::ICS-NotificationFactory/action/makeNotification?alt=json with body:

{
    "arguments": {
        "className": "Router",
        "instanceName": "Test",
        "eventName": "Down"
    }
}'

 

  • Update Notification:

Perform PUT as http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_Notification::NOTIFICATION-Router_Test_Down?alt=json with body:

{
    "ICS_Notification": {
        "Severity": "2"
    }
}'

 

  • Delete Notification:

Perform PUT as http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_Notification::NOTIFICATION-Router_Test_Down?alt=json

 

Example for Curl:

curl -k -u <username>:<password> -XPOST -H 'Content-Type: application/json' http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_NotificationFactory::ICS-NotificationFactory/action/makeNotification?alt=json -d '

{
    "arguments": {
        "className": "Router",
        "instanceName": "Test",
        "eventName": "Down"
    }
}'

 

Similarly, other actions can be performed. For update payload, refer above example from POSTMAN. 

Reference: Smarts_EDAA_GUIDE

Additional Information

All demonstrated actions will create notification in domain however it will not be visible in SAM's console, this is due to fact that we are initiating makeNotification but not calling NL_Notify and NL_Change.

  • NL_Notify in SAM:

Perform POST as http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_Notification::NOTIFICATION-Router_Test_Down/action/notify?alt=json with body:

{
    "arguments": {
        "User": "<USER_NAME>",
        "Source": "<DOMAIN_NAME>",
        "AuditTrailText": "Notified by <USER_NAME> from External"
    }
}'

  • NL_Change in SAM:

Perform POST as http://<SAM_IP/FQDN>:8080/smarts-edaa/msa/<DOMAIN_NAME>/instances/ICS_Notification::NOTIFICATION-Router_Test_Down/action/changed?alt=json with empty body.