Documentation is now available for the Fall 2020 Update release!

Create recurring schedule – monthly pattern

This endpoint is used to create a monthly recurring schedule.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/scheduleMaintenances

Sample URLs

https://{api-url}/api/v2/tenants/client_93/scheduleMaintenances

Parameters

FieldData TypeDescription
nameStringSchedule name.
descriptionStringSchedule description.
devices/deviceGroups/locationsStringDetails of resources which should be added to schedule maintenance window. No more than 100 resources can be added to a schedule maintenance window.
schedule
  1. type
  2. startTime
  3. endTime
  4. timezone
  5. pattern
    1. type
    2. dayOfMonth
    3. weekIndex
    4. dayOfWeek

  1. String
  2. String
  3. String
  4. String
  5. String
    1. String
    2. Integer
    3. String
    4. String
Schedule details:
  1. Schedule type.
  2. Time at which the schedule activity should begin.
  3. Time at which the schedule activity should end.
  4. Timezone in which the schedule should operate. (The list of timezones are shown below.)
    Example: "timezone": "America/Puerto_Rico"
  5. Schedule pattern
    1. Pattern type.
    2. Day of the month.
      Supported Values: 1, 2, 3, 4, 5..........28, 29, 30, 31
    3. Week Index.
      Supported Values: First, Second, Third, Fourth, Fifth, Last
    4. Day of Week.
      Supported Values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
runRBABoolean(Optional) Set runRBA=true to run RBA scripts; otherwise, set to false.
installPatchBoolean(Optional) Set installPatch=true to install patch; otherwise, set to false.
endByString(Optional) Maintenance ending schedule.
  1. For a recurring schedule maintenance to be perpetual, provide endBy: NEVER. In this case, time specified in the field endTime is the scheduled end time. (The date is *not* considered by the API.) To assign a schedule maintenance to run on alternate days, it starts at 8 AM and ends at 5:30 PM. Maintenance is to be set as a repetitive process that never ends. The values provided are:
    "schedule": {
        "type": "Recurring",
        "startTime": "2018-05-28T08:00:00+0000",
        "endTime": "2018-10-29T17:30:00+0000",
        "timezone": "America/Puerto_Rico",
        "pattern":
            "type": "daily",
            "dayFrequency": "everyday"
            "repeatFrequency": 1
            "endBy": "Never"
        }
    }
  2. For a  recurring schedule maintenance to end at a specific time period, provide the end date and time in the field endTime. Example: "2016-05-29T18:55:27+0000"
installPatchBoolean(Optional) Set installPatch=true to install patch.
runEscalationActionBoolean(Optional) Provide runEscalationAction: true to escalate maintenance alerts after schedule maintenance is completed. If no value is provided, the default value is true.
alertConditions
  1. matchingType
  2. rules
    1. key
    2. operator
    3. value
String(Optional) For specific alerts to be triggered as maintenance alerts, configure the below alert conditions. Alerts that do match with the below conditions are triggered as monitoring alerts:
  1. Alert conditions should match ALL or ANY of the rules.
  2. Conditions for filter alerts:
    1. Unique attribute of alert.
    2. Logical operators to filter alertsSupported values: Equals, NotEquals, Equals, NotEquals, Startswith, Endswith, Regex. See Regular Expressions to filter alerts with operator Regex.
    3. Unique data of alert.
      Example: Cloud Controller Discovery
Timezones
Pacific/AsiaPacific/HonoluluAmerica/Anchorage
America/Los_AngelesAmerica/DenverAmerica/Chicago
America/New_YorkAmerica/Puerto_RicoAmerica/St_Johns
America/Buenos_AiresAtlantic/AzoresEurope/London
Europe/ParisEurope/IstanbulAfrica/Addis_Ababa
Asia/TehranAsia/YerevanAsia/Karachi
Asia/CalcuttaAsia/DaccaAsia/Saigon
Asia/ShanghaiAsia/TokyoAustralia/Darwin
Australia/SydneyPacific/GuadalcanalPacific/Auckland

Sample requests

This is a sample request for DayOfMonth recurring schedule:

{
	"name": "Recurring-monthly-1schedule",
	"description": "Recurring-monthly-1schedule",
	"runRBA": "false",
	"installPatch": "false",
	"devices": [{
			"hostName": "Device_4"
		},
		{
			"uniqueId": "90491678-096c-4223-9867-f31c37ff09da"
		}
	],
	"deviceGroups": [{
			"name": "DG-1"
		},
		{
			"id": "11"
		}
	],
	"locations": [{
			"name": "LOC-1"
		},
		{
			"id": "12"
		}
	],
	"schedule": {
		"type": "Recurring",
		"startTime": "2015-05-28T10:55:27+0000",
		"endTime": "2015-05-29T18:55:27+0000",
		"timezone": "America/Puerto_Rico",
		"pattern": {
			"type": "monthly",
			"dayOfMonth": "14"
		}
	}
}

This is a sample request for DayOfWeek recurring schedule:

{
	"name": "Recurring-monthly-2schedule",
	"description": "Recurring-monthly-2schedule",
	"runRBA": "false",
	"installPatch": "false",
	"devices": [{
			"hostName": "Device_2"
		},
		{
			"id": "10"
		}
	],
	"deviceGroups": [{
			"name": "DG-1"
		},
		{
			"id": "11"
		}
	],
	"locations": [{
			"name": "LOC-1"
		},
		{
			"id": "12"
		}
	],
	"schedule": {
		"type": "Recurring",
		"startTime": "2015-05-28T10:55:27+0000",
		"endTime": "2015-05-29T18:55:27+0000",
		"timezone": "America/Los_Angeles",
		"pattern": {
			"type": "monthly",
			"weekIndex": "Third",
			"dayOfWeek": "Thursday"
		}
	}
}

Sample response

{
	"uniqueId": "SM-c21c7n32-b67d-125h-8712-7d234090ad32"
}