updateMaintenanceWindow
A MoogDb v2 method that updates an existing maintenance window object, by passing an object containing the maintenance window information.
Back to MoogDb V2 API Method Reference.
Request arguments
Method updateMaintenanceWindow
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| JSON Object | Yes | Maintenance window object containing the updated details. |
The maintenance window object updatedWindow
contains the following information:
Name | Type | Required | Description |
---|---|---|---|
| Number | Yes | ID of the maintenance window you want to update. |
| Number | Yes | ID of the user who is updating the maintenance window. |
| String | No | Name of the maintenance window. |
| String | No | Description of the maintenance window. |
| String | No | SQL-like filter that alerts must match to be included in the maintenance window. See Filter Search Data for more information on creating SQL-like filters. |
| Number | No | Start time of the maintenance window. This must be in Unix epoch time in seconds and may be up to 5 years in the future. |
| Number | No | Duration of the maintenance window in seconds. The minimum duration is 1 second and the maximum is 157784630 seconds (5 years). |
| Boolean | No | Determines whether or not alerts should be forwarded to the next Moolet in the processing chain. |
| Number | No | |
| Number | No |
Response
Method updateMaintenanceWindow
returns the following response:
Type | Description |
---|---|
Object | A JSON object containing details of the updated maintenance window. |
Examples
The following examples demonstrate typical use of method updateMaintenanceWindow
:
Request example
Example request to update the description in maintenance window ID 2 by user ID 3:
var response = moogdb.updateMaintenanceWindow({ "id" : 2, "description" : "Updated name", "user_id": 3 });
Response example
Example response returning details of the updated maintenance window ID 2:
{ "del_flag": false, "forward_alerts": false, "last_updated": 1574164759, "timezone": "Europe/London", "description": "Updated name", "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 }