Definition for creating or updating a given scheduled maintenance window
Request:
curl --request POST \ --url https://api.moogsoft.ai/v1/maintenance/windows \ --header 'accept: application/json' \ --header 'apiKey: < apiKey >' \ --header 'content-type: application/json' \ --data ' { "start": "1673644959000", "repeats": { "period": "daily", "frequency": 2 }, "name": "Window1", "description": "First Window", "externalLink": "www.someurl.com/externallink.html", "filter": "source = myserver", "duration": 900, "timezone": "(GMT-10:00) Hawaii - Pacific/Honolulu" } '
Request Body:
name
description
externalLink
filter
start
duration
timezone
repeats
---period
---until
---times
---frequency
name
optional
string
Name of the maintenance window
description
optional
string
Description of the maintenance window
externalLink
optional
string
Optional change Record link to an external system
filter
required
string
Required filter string. Alerts matching this filter during an active maintenance window get tagged as in_maintenance = true
.
start
required
number
Start time of the maintenance window, milliseconds since Jan 1, 1970 GMT
duration
required
integer
Duration of the maintenance window, in seconds (must be >= 60)
timezone
optional
string
Optional timezone of the maintenance window; used for display purposes. See Valid Time Zones for Maintenance Windows for a list of valid time zones.
repeats
required for repeating occurrences
one of: object (period, until, times, or frequency)
Optional timezone of the maintenance window; used for display purposes
---period
string
required for repeating occurrences
Periodicity of the schedule
Allowed values: daily, weekly, monthly, monthly_nth_day
---until
optional
number
Final run time of the schedule; in milliseconds since Jan 1, 1970 GMT
---times
optional
integer
Maximum number of times to run the schedule (note: only one of 'until' and 'times' is allowed to be used)
Must be >= 1
---frequency
required for repeating occurrences
integer
Frequency of the period, eg., every day, every 3rd day, etc.
Must be >= 1