Notifications

listNotificationProfiles

This API is used to list all the Notification Profiles.

HTTP Method

GET

API URL

To list all global profiles:

http://localhost:8060/api/json/admin/listNotificationProfiles?apiKey=*********&profileFilter=All

To list Log A Ticket type global profiles:

 http://localhost:8060/api/json/admin/listNotificationProfiles?apiKey=**********&profileFilter=Log a Ticket

To list all device specific profiles:

 http://localhost:8060/api/json/admin/listNotificationProfiles?apiKey=***********&isGlobal=false

Parameters

Param NameDescriptionData TypeAdditional InformationIs Mandatory
apiKeyAPI key to access your OpManager server.String-Yes
isGlobalBoolean flag indicating whether to fetch only global profiles or the device specific profiles
Booleantrue- Lists only global profiles.
false- Lists all device-specific profiles.
No
profileFilterTo filter global notification profiles, based on action typesStringAll - To list all global profiles
Send Email, Send SMS, Send Modem SMS, Run System Command, Run Program, Log a Ticket, Web Alarm, Send SysLog, Send Trap, Chat, SDPOnDemand, Webhook, CITemplate, Ansible, CITInternal, Splunk, SIEM - To list all the global profiles based on the mentioned type
No

Sample Response

HTTP Code: 200

[
    {
        "profileName": "CriticalAlerts_To_Admin",
        "actionDisplayName": "Run System Command",
        "associationTypeDisplayName": "Manual",
        "profileLabel": "Run System Command",
        "criteriaId": "301",
        "profileId": "301",
        "associationType": "MANUAL",
        "isGlobal": true,
        "status": "true",
        "actionName": "Run System Command"
    },
    {
        "profileName": "Default Notification Profile",
        "actionDisplayName": "Send Email",
        "associationTypeDisplayName": "Manual",
        "profileLabel": "Send Email",
        "criteriaId": "1",
        "profileId": "1",
        "associationType": "MANUAL",
        "isGlobal": true,
        "status": "true",
        "actionName": "Send Email"
    }
]
Rate limit: 50 requests per minute. Exceeding this limit will block requests for 5 minutes

associateNotificationProfiles

This API is used to associate notification profiles to a device or a device group or an interface group.

HTTP Method

POST

API URL

To associate devices:

 https://localhost:8060/api/json/admin/associateNotificationProfiles?apiKey=***************&deviceName=xxx.xxx.xx.x&profiles=501

To associate groups:

  https://localhost:8060/api/json/admin/associateNotificationProfiles?apiKey=***************&groupName=chennai-3005&profiles=504

Parameters

Note: While deviceName, and groupName are each marked as not mandatory, at least one of the two must be provided in the request.

Param NameDescriptionData TypeAdditional InformationIs Mandatory
apiKeyAPI key to access your OpManager server.String-Yes
deviceNameName of the device to which the notification profiles should be associated.

The 'deviceName' value can be obtained from the 'deviceName' key in the JSON response of the listDevices API.
String-No
groupNameName of the device/interface group to which the notification profiles should be associated.

The 'groupName' value can be obtained from the 'groupName' key in the JSON response of the listAllLogicalGroups API.
String-No
profilesIDs of the profiles for association.

The 'profiles' value can be obtained from the 'profileId' key in the JSON response of the listNotificationProfiles API.
LongAllowed values: Comma-separated Profile IDs (e.g., 501,502,504).

Note : Refer the 'associationType' key from the same API response and select profileId of MANUAL or BY_DEVICE_GROUP or BY_INTERFACE_GROUP association type to associate device or device group or interface group respectively.
Yes

Sample Response

HTTP Code: 200

{ "result":{ "message": "Notification Profile has been associated successfully"}}
Rate limit: 50 requests per minute. Exceeding this limit will block requests for 5 minutes

updateNotificationProfileStatus

This API is used to enable/disable notification profiles. This API will be available from OpManager version 127189

HTTP Method

POST

API URL

https://localhost:8060/api/json/admin/updateNotificationProfileStatus?apiKey=***************&profileName=testprofile&profileId=301&status=disable

Parameters

Param NameDescriptionData TypeAdditional InformationIs Mandatory
apiKeyAPI key to access your OpManager server.String-Yes
profileNameName of the notification profile to be enabled or disabled.
The 'profileName' value can be obtained from the 'profileName' key in the JSON response of the listNotificationProfiles API.
String-Yes
profileIdID of the notification profile to be enabled or disabled.
The 'profiles' value can be obtained from the 'profileId' key in the JSON response of the listNotificationProfiles API.
Long-Yes
statusSpecifies whether the profile has to be enabled or disabled.StringAllowed values: enable, disableYes

Sample Response

HTTP Code: 200

{"message":"Notification Profile(s) enabled successfully"} or{"message":"Notification Profile(s) disabled successfully"}
Rate limit: 50 requests per minute. Exceeding this limit will block requests for 5 minutes

getNotificationProfiles

This API is used to list notification profiles specific to the device.

HTTP Method

GET

API URL

For Devices:

https://localhost:8060/api/json/device/getNotificationProfiles?apiKey=***************&name=xxx.xxx.xx.x

For Groups

https://localhost:8060/api/json/device/getNotificationProfiles?apiKey=***************&groupName=chennai-4379

Parameters

Note: While name, and groupName are each marked as not mandatory, at least one of the two must be provided in the request.

Param NameDescriptionData TypeAdditional InformationIs Mandatory
apiKeyAPI key to access your OpManager server.String-Yes
nameName of the device for which the associated notification profiles should be listed.
The 'name' value can be obtained from the 'deviceName' key in the JSON response of the listDevices API.
String-No
groupNameName of the device/interface group for which the associated notification profiles should be listed.
The 'groupName' value can be obtained from the 'groupName' key in the JSON response of the listAllLogicalGroups API.
String-No

Sample Response

HTTP Code: 200

[ { "profileName": "Default Notification Profile", "actionDisplayName": "Send Email", "profileLabel": "Send Email", "criteriaId": "301", "profileId": "601", "isGlobal": true, "actionName": "Send Email", "status": "true"}]
Rate limit: 50 requests per minute. Exceeding this limit will block requests for 5 minutes