listAlarms
This API is used to list all the alarms generated in OpManager.
HTTP Method
GET
API URL
http://localhost:8060/api/json/alarm/listAlarms?apiKey=********&deviceName=test1.zoho.com&severity=1&category=Device_Category&entity=sample_entity&alertType=ActiveAlarms&fromTime=2022-05-02 08:00:00&toTime=2022-06-02 18:30:00Parameters
| Param Name | Description | Data Type | Additional Information | Is Mandatory |
|---|---|---|---|---|
| apiKey | API Key to access your OpManager server. | Yes | ||
| deviceName | Name of the device for which the alarms should be listed. This can be retrieved using the listDevices API. | String | Allowed values: Any valid device name | No |
| severity | Severity of the alarm. | Allowed values: 1 (Critical), 2 (Trouble), 3 (Attention), 4 (Service Down), 5 (Clear) (e.g., severity=1) | No | |
| category | Category of the device | A valid category name. Allowed Characters: Any letters, numbers and these symbols: . , space ~ ` : \ / - _ | No | |
| alertType | Type of the alarms. | Allowed values: ActiveAlarms, EventLogAlarms, SyslogAlarms, TrapAlarms, NCMAlarms, NFAAlarms, WebAlarms, FWAAlarms, StorageAlarms, APMAlarms, Server, Network, Virtualization, CorrelatedAlarms. (e.g., alertType=ActiveAlarms) | No | |
| fromTime | Start time for the custom time period range. | It could be of the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. If no time is specified (i.e, yyyy-mm-dd format), the default time will be set to 12 A.M(start of the day). (e.g., fromTime=2022-05-02 08:00:00) | No | |
| toTime | End time for the custom time period range. | It could be of the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss. If no time is specified (i.e, yyyy-mm-dd format), the default time will be set to 12 A.M(start of the day). (e.g., toTime=2022-06-02 18:30:00) | No | |
| probeName | The name of the Probe. The probe name could be obtained by executing the listProbes API ,where the parameter name in the response refers to the probeName.[Applicable only for Central Server] | A valid probe name. Allowed: Any combination of letters, numbers, underscores, and spaces. | No |
Sample Response
HTTP Code: 200
{ "alarmPresent": true, "total": 1, "Details":{ "Server": [ { "label": "Attention", "value": 2, "status": 3} ]}, "pageLength": 100, "records": 2, "Acknowledge": "0", "Unacknowledge": "2", "severityVsCount":{ "Attention": 2}, "page": 1, "rowCount": 2, "rows": [ { "categoryString": "Server", "prettyTime": "147 days ago", "statusStr": "Attention", "isSuppressed": false, "displayName": "deviceName1", "lastNote": -1, "technician": "Unacknowledged", "message": "CPU Ready [VMware]'s data collection has been failing continuously", "deviceName": "deviceName1", "statusNum": 3, "suppressedMessage": "", "modTimeLong": 1748980058922, "modTime": "06/03/2025 12:47:38 PM PDT", "alarmId": 307, "eventtype": "Poll Failure", "category": "Server", "entity": "PollFailure_4260", "alarmcode": "PollFailure_Down_4260", "who": "Unacknowledge"}, { "categoryString": "Server", "prettyTime": "147 days ago", "statusStr": "Attention", "isSuppressed": false, "displayName": "deviceName2", "lastNote": -1, "technician": "Unacknowledged", "message": "CPU Utilization [VMware]'s data collection has been failing continuously", "deviceName": "deviceName2", "statusNum": 3, "suppressedMessage": "", "modTimeLong": 1748980058904, "modTime": "06/03/2025 12:47:38 PM PDT", "alarmId": 311, "eventtype": "Poll Failure", "category": "Server", "entity": "PollFailure_4266", "alarmcode": "PollFailure_Down_4266", "who": "Unacknowledge"} ], "notificationEnabled": true}