A MoogDb v2 method that returns maintenance windows based on a start position and a limit. Only returns active recurring windows and scheduled maintenance windows, not expired or deleted maintenance windows.
Back to MoogDb V2 API Method Reference.
Method getMaintenanceWindows
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Number | Yes | Number of the first maintenance window to return, 0 to start at the first, 10 to start at the 11th. |
| Number | Yes | Maximum number of maintenance windows to return. |
Method getMaintenanceWindows
returns the following response:
Type | Description |
---|---|
Native Object | A JSON object with a nested array containing information on the maintenance windows. |
The following examples demonstrate typical use of method getMaintenanceWindows
:
Example request to return the first maintenance window in the database:
var response = moogdb.getMaintenanceWindows(0,1);
Example response returning details of the first maintenance window:
[
{
"del_flag": false,
"forward_alerts": false,
"last_updated": 1574164385,
"timezone": "Europe/London",
"description": "Test",
"recurring_period_units": 0,
"filter": "(severity IN (0, 1, 2, 3, 4, 5)) AND (owner IN (3))",
"duration": 3600,
"recurring_period": 0,
"name": "Test",
"updated_by": 3,
"id": 2,
"start_date_time": 1574164339
}
]