Moogsoft Docs

getMaintenanceWindows

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.

Request arguments

Method getMaintenanceWindows takes the following request arguments:

Name

Type

Required

Description

start

Number

Yes

Number of the first maintenance window to return, 0 to start at the first, 10 to start at the 11th.

limit

Number

Yes

Maximum number of maintenance windows to return.

Response

Method getMaintenanceWindows returns the following response:

Type

Description

Native Object

A JSON object with a nested array containing information on the maintenance windows.

Examples

The following examples demonstrate typical use of method getMaintenanceWindows:

Request example

Example request to return the first maintenance window in the database:

var response = moogdb.getMaintenanceWindows(0,1);

Response example

Example response returning details of the first maintenance window:

[
  {
    "del_flag": false,
    "forward_alerts": false,
    "last_updated": 1573473584,
    "timezone": "Europe/London",
    "description": "This is test window",
    "recurring_period_units": 0,
    "filter": "{ \"left\": { \"column\": \"owner\", \"op\": 6, \"value\": [3], \"type\": \"LEAF\" }, \"oper\": \"AND\", \"right\": { \"column\": \"severity\", \"op\": 6, \"value\": [0,1,2,3,4,5], \"type\": \"LEAF\" }, \"type\": \"BRANCH\" }",
    "duration": 3600,
    "recurring_period": 0,
    "name": "Test Window",
    "updated_by": 3,
    "id": 1,
    "start_date_time": 1574155038
  }
]