Edit Downtime Scheduler Tasks APIs


This API allows the user to edit downtime schedules in Applications Manager. Users can edit schedules with the following recurring types:

  1. Daily
  2. Weekly
  3. Monthly
  4. Once

You can schedule a maintenance task for for monitor groups as well as individual monitors. To configure a schedule for a monitor group, just provide the tasktype as group and resourceid as the monitor group id.

Supported HTTP methods: POST

Allowed roles: Administrator, Operator

Editing Downtime Schedule with Recurring type Daily

Sample Request:

https://[HOST]:[PORT]/AppManager/xml/EditMaintenanceTask?apikey=[APIKEY]&taskMethod=[TASKMETHOD]&taskStartTime=[TASKSTARTTIME]
&taskEndTime=[TASKENDTIME]&taskStatus=[TASKSTATUS]&taskEffectFrom=[TASKEFFECTFROM]&taskName=[TASKNAME]&taskType=[TASKTYPE]
&resourceid=[RESOURCEID]&taskid=[TASKID]&overwriteAssociatedResource=[TRUE/FALSE]

Supported HTTP methods: POST

Allowed roles: Administrator, Operator

Request Parameters

The parameters involved in the API request are described below. Also, refer the list of common Request Parameters involved in executing the EditMaintenanceTask API requests.

FieldDescription
taskMethod Denotes the recurring frequency of the maintenance schedule, 'daily' indicates the schedule runs every day.
taskStartTime The time when the maintenance task starts running
taskEndTime The time when the maintenance task stops running
taskEffectFrom The date and time from which the maintenance task becomes active
offset The difference in the number of hours with respect to GMT. If the offset value provided is invalid, Applications Manager uses the user's system time as the offset value.
taskType The type of task to be created. Possible values are monitor (for an individual monitor) and group (for a monitor group) .You can configure a schedule for a monitor group by providing the tasktype as group.
resourceid The resource id of the monitor or monitor group for which the schedule has to be created
overwriteAssociatedResource

Enables overwriting of already associated resources. This means that if the value of the parameter is true, the already associated resource Ids are deleted and the newly provided ids and used in the task. Possible values are:

  1. True
  2. False

Example:

https://apm-prod-server:8443/AppManager/xml/EditMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskMethod=daily&taskStartTime=20:00&taskEndTime=21:00&taskStatus=enable&taskEffectFrom=2018-08-08%2016:48&taskName=test&taskType=monitor&resourceid=10000017&taskid=10000001&overwriteAssociatedResource=false

Example output:

<AppManager-response uri="/AppManager/xml/EditMaintenanceTask">
   <result>
      <response response-code="4000">
         <message>Maintenance Task successfully edited.</message>
      </response>
   </result>
</AppManager-response>

Editing Downtime Schedule with Recurring type Weekly

Sample Request:

https://[HOST]:[PORT]/AppManager/xml/EditMaintenanceTask?apikey=[APIKEY]&taskType=[TASKTYPE]&resourceid=[RESOURCEID]&totalNumber=[TOTALNUMBER]
&taskMethod=[TASKMETHOD]&taskDescription=[TASKDESCRIPTION]&taskStatus=[TASKSTATUS]&taskEffectFrom=[DATETIME]&startDay1=[STARTDAY1]
&startTime1=[STARTTIME1]&endDay1=[ENDDAY1]&endTime1=[ENDTIME1]&taskName=[TASKNAME]&taskid=[TASKID]&overwriteAssociatedResource=[TRUE/FALSE]

Supported HTTP methods: POST

Allowed roles: Administrator, Operator

Request Parameters

The parameters involved in the API request are described below. Also, refer the list of common Request Parameters involved in executing the EditMaintenanceTask API requests.

FieldDescription
totalNumber The number of schedules to be created. You can create a maximum of 7 weekly schedules
taskMethod Denotes the recurring frequency of the maintenance schedule, 'weekly' indicates the schedule runs every week.
taskDescription The description of what the maintenance schedule does, optional value.
taskEffectFrom The date and time from which the maintenance task becomes active
startDay[n] The day on which the maintenance task starts running. The allowed values for n are sunday,monday,tuesday,wednesday,thursday,friday and saturday (case insensitive)
startTime[n] The time when the maintenance task starts running. The allowed values for n should be in the format HH:MM. Eg: startTime - 10:00
endDay[n] The day on which the maintenance task stops running. The allowed values for n are sunday,monday,tuesday,wednesday,thursday,friday and saturday (case insensitive)
endTime[n] The time at which the maintenance task stops running. The allowed values for n should be in the format HH:MM. Eg: endTime - 11:00
offset The difference in the number of hours with respect to GMT. If the offset value provided is invalid, Applications Manager uses the user's system time as the offset value.
taskType The type of task to be created. Possible values are monitor (for an individual monitor) and group (for a monitor group) .You can configure a schedule for a monitor group by providing the tasktype as group.
resourceid The resource id of the monitor or monitor group for which the schedule has to be created.
overwriteAssociatedResource

Enables overwriting of already associated resources. This means that if the value of the parameter is true, the already associated resource Ids are deleted and the newly provided ids and used in the task. Possible values are:

  1. True
  2. False

Example:

https://apm-prod-server:8443/AppManager/xml/EditMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskType=monitor
&resourceid=10000028&totalNumber=1&taskMethod=weekly&taskDescription=&taskStatus=enable&taskEffectFrom=2010-06-01%2011:25
&startDay1=tuesday&startTime1=10:00&endDay1=friday&endTime1=12:00&taskName=week1&taskid=10000004&overwriteAssociatedResource=false

Downtime Schedule with Recurring type Monthly

Sample Request:

Schedule by week:

https://[HOST]:[PORT]/AppManager/[xml/json]/EditMaintenanceTask?apikey=[apikey]&taskType=[monitor/group]&resourceid=[resourceid]&totalNumber=[1-5]&taskMethod=monthly&taskDescription=[descrition of the downtime schedule]&taskStatus=[enable/disable]&taskEffectFrom=[yyyy-mm-dd HH:mm]&taskName=[name of task]&months=[comma seperated numbers representing months]&dateOrWeekWise=[week]&startsOn1=[First/Second/Third/Fourth/Last]&startDay1=[day]&startTime1=[HH:mm]&endAfter1=[1-7]&endTime1=[HH:mm]&taskid=[downtimeschedulerid] 

Schedule by date:

https://[HOST]:[PORT]/AppManager/[xml/json]/EditMaintenanceTask?apikey=[apikey]&taskType=[monitor/group]&resourceid=[resourceid]&totalNumber=[1-5]&taskMethod=monthly&taskDescription=[descrition of the downtime schedule]&taskStatus=[enable/disable]&taskEffectFrom=[yyyy-mm-dd HH:mm]&taskName=[name of task]&months=[comma seperated numbers representing months]&dateOrWeekWise=[date]&startDate1=[date]&last1=[on]&startTime1=[HH:mm]&endDate1=[date]&endTime1=[HH:mm]&taskid=[downtimeschedulerid]

Request Parameters

The parameters involved in the API request are described below:

FieldDescription
API Key The key generated from "Generate API Key" option in the Settings tab.
taskType The type of task to be created. Possible values are monitor (for an individual monitor) and group (for a monitor group) .You can configure a schedule for a monitor group by providing the tasktype as group.
resourceid The resource id of the monitor or monitor group for which the schedule has to be created
totalNumber Number of schedules
taskMethod Denotes the recurring frequency of the maintenance schedule, 'monthly' indicates the schedule runs every week.
taskDescription The description of what the maintenance schedule does. This parameter is optional.
taskStatus Enabled or disabled.
dataCollectionType This option allows you to stop either monitoring or alarms during maintenance. Possible parameter values are suppressMonitoring and suppressAlarms.
taskEffectFrom The date and time when the schedule starts running
taskName Name of the task
months The months for which the schedule is supposed to run.
dateOrWeekWise Whether it should be scheduled weekwise or datewise.
startsOn1 The week of the month the schedule should start running.
startDay1 The day of the week the schedule should start running.
startTime1 The time at which the schedule should start running.
endAfter1 Number of days it should end after.
endTime1 Time at which the schedule should end.
startDate1 Date number at which the schedule starts.
startTime1 Time at which the schedule should start.
endDate1 Date number at which the schedule should end.
endTime1 Time at which the schedule should end.

Example:

Schedule by week:

https://apm-prod-server:8443/AppManager/xml/EditMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskType=monitor&resourceid=10000015&totalNumber=1&taskMethod=monthly&taskDescription=none&taskStatus=enable&taskEffectFrom=2010-06-01%2011:25&taskName=monthlyweekwisetask&months=1,2,3,4&dateOrWeekWise=week&startsOn1=First&startDay1=Sunday&startTime1=10:00&endAfter1=2&endTime1=20:10&taskid=10000001

Schedule by Date:

https://apm-prod-server:8443/AppManager/xml/EditMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskType=monitor&resourceid=10000015&totalNumber=2&taskMethod=monthly&taskDescription=none&taskStatus=enable&taskEffectFrom=2010-06-01%2011:25&taskName=monthlydatewisetask&months=1,2,3,4&dateOrWeekWise=date&startDate1=2&last1=&startTime1=10:00&endDate1=2&endTime1=20:10&startDate2=2&last2=on&startTime2=10:00&endDate2=1&endTime2=20:10&taskid=10000001

Downtime Schedule with Recurring type Once

Sample Request:

https://[HOST]:[PORT]/AppManager/xml/EditMaintenanceTask?apikey=[APIKEY]&taskMethod=[TASKMETHOD]&customTaskStartTime=[CUSTOMTASKSTARTTIME]
&customTaskEndTime=[CUSTOMTASKENDTIME]&taskStatus=[TASKSTATUS]&taskName=[TASKNAME]&taskType=[TASKTYPE]
&taskDescription=[TASKDESCRIPTION]&resourceid=[RESOURCEID]&taskid=[TASKID]&overwriteAssociatedResource=[TRUE/FALSE]

Request Parameters

The parameters involved in the API request are described below:

  • True
  • False
FieldDescription
taskMethod Denotes the recurring frequency of the maintenance schedule, 'weekly' indicates the schedule runs every week.
customTaskStartTime The date and time when the schedule starts running
customTaskEndTime The date and time when the schedule stops running
taskDescription The description of what the maintenance schedule does. This parameter is optional.
offset The difference in the number of hours with respect to GMT. If the offset value provided is invalid, Applications Manager uses the user's system time as the offset value.
taskType The type of task to be created. Possible values are monitor (for an individual monitor) and group (for a monitor group) .You can configure a schedule for a monitor group by providing the tasktype as group.
resourceid The resource id of the monitor or monitor group for which the schedule has to be created.
overwriteAssociatedResource Enables overwriting of already associated resources. This means that if the value of the parameter is true, the already associated resource Ids are deleted and the newly provided ids and used in the task. Possible values are:

Example:

https://apm-prod-server:8443/AppManager/xml/EditMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskMethod=once
&customTaskStartTime=2010-06-03%2012:46&customTaskEndTime=2010-06-05%2012:46&taskStatus=enable&taskName=once1
&taskType=monitor&taskDescription=&resourceid=10000322&taskid=10000005&overwriteAssociatedResource=false

 

Note: You can obtain the resourceid of a monitor by executing the ListMonitor API request. The output of this request contains resourceid of the monitor, among other values.