Alarms
API call for monitoring of alarms information:
Alarms
Display information about cleared and currently active alarms.
Alarms Using GET Method
If the query size is less than 2048 characters, use the GET method.
URL: https://vmanage-ip-address/dataservice/alarms?query=query
Method: GET
Request Parameters
Name | Required | Description | Parameter Type | Data Type |
---|---|---|---|---|
query | Optional | Query to filter data returned | Query | String (json) |
Alarms Using POST Method
If the query size is more than 2048 characters, use the POST method. This is the recommended method.
URL: https://vmanage-ip-address/dataservice/alarms
Method: POST
Request Parameters
Name | Required | Description | Parameter Type | Data Type |
---|---|---|---|---|
query | Optional | Query to filter data returned | Body | String (json) |
Response Content Type: application/json
Response Object: See Response Object, below.
Example
Get 10,000 alarms from the previous six hours using the query below:
{ "query": { "condition": "AND", "rules": [ { "value": [ "6" ], "field": "entry_time", "type": "date", "operator": "last_n_hours" } ] }, "size": 10000 }
Get critical alarms from the previous three hours:
{ "query": { "condition": "AND", "rules": [ { "value": [ "3" ], "field": "entry_time", "type": "date", "operator": "last_n_hours" }, { "value": [ "Critical" ], "field": "severity", "type": "string", "operator": "in" } ] } }
Supported Fields
Displays list of fields and corresponding data type for the alarm.
URL: https://vmanage-ip-address/dataservice/alarms/fields
Method: GET
Response Object for Alarms API Calls
Alarms API call responses have the following format:
{ "header": { "generatedOn": timestamp, milliseconds (UNIX time format), "viewKeys": { "uniqueKey": ["key"] }, "fields": [ properties and types ], }, "data": [ array of objects ] }
Additional Information
Using the vManage REST APIs
vManage Aggregation Query
vManage Simple Query