findMaintenanceWindows
A MoogDb v2 method that finds maintenance windows based on a filter and a limit.
Back to MoogDb V2 API Method Reference.
Request arguments
Method findMaintenanceWindows
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
SQL-like or JSON filter to match maintenance windows that you want to find. For
example: See Filter Search Data for more information on creating SQL-like filters. |
|
Number |
No |
Maximum number of windows to return. Default is 100. |
Response
Method findMaintenanceWindows
returns the following response:
Type |
Description |
---|---|
Object |
A JSON object containing maintenance windows that match the filter. |
Examples
The following examples demonstrate typical use of method findMaintenanceWindows
:
Request example
Example request to return maintenance windows where the description matches "Test":
var response = moogdb.findMaintenanceWindows("description matches Test");
Response example
Example response returning a maintenance windowswhere the description matches "Test":
[ { "del_flag": false, "forward_alerts": false, "last_updated": 1573484274, "timezone": "Europe/London", "description": "Test", "recurring_period_units": 0, "filter": "{ \"left\": { \"column\": \"owner\", \"op\": 6, \"value\": [3], \"type\": \"LEAF\" }, \"oper\": \"AND\", \"right\": { \"column\": \"severity\", \"op\": 6, \"value\": [1,3,4,5], \"type\": \"LEAF\" }, \"type\": \"BRANCH\" }", "duration": 3600, "recurring_period": 0, "name": "Test", "updated_by": 3, "id": 1, "start_date_time": 1574094649 } ]