Hey! These docs are for version 6.3, which is no longer officially supported. Click here for the latest version, 6.7!

Rest API Config endpoint for notification methods

Object type: notificationmethod

Request URL: /rest/config/notificationmethod

Example GET:

{
   "object" : {
      "namespace" : "com.opsview.notificationmethods.aql",
      "master" : "0",
      "name" : "AQL",
      "active" : "1",
      "notificationprofiles" : [
         {
            "ref" : "/rest/config/notificationprofile/12",
            "name" : "Non work hours sms"
         },
         {
            "ref" : "/rest/config/notificationprofile/3",
            "name" : "Default"
         }
      ],
      "id" : "1",
      "uncommitted" : "0",
      "command" : "submit_sms_aql -u '' -p '' -P ''",
      "contact_variables" : "PAGER",
      "variables" : [
        {
           "name" : "AQL_PASSWORD",
           "value" : "aqlpass"
        },
        {
           "name" : "AQL_PROXY_SERVER",
           "value" : "http://proxy.example.com"
        },
        {
           "name" : "AQL_USERNAME",
           "value" : "aqluser"
        }
     ]
   }
}

Optional parameters:

  • include_contacts - if set to 1, will return a list of contacts for all the notification profiles and the shared notification profiles as an array of hashes, eg:

      notificationprofile_contacts => [
       { id => 8, name => "viewsomechangenone" },
       { id => 9, name => "viewsomechangenonewonotify" },
     ]