This API allows the user to create downtime schedules in Applications Manager. The schedules can be created with any of the following recurrence types:
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.
https://[HOST]:[PORT]/AppManager/xml/CreateMaintenanceTask?apikey=[APIKEY]&taskMethod=daily&taskStartTime=[STARTTIME]&taskEndTime=[ENDTIME]&taskStatus=disable&taskEffectFrom=[DATE]&taskName=[NAME]&taskType=monitor&resourceid=[RESOURCEID]
Supported HTTP methods: POST
Allowed roles: Administrator, Operator
The parameters involved in the API request are described below. Also, refer to the list of common request parameters.
Field | Description |
---|---|
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 |
https://apm-prod-server:8443/AppManager/xml/CreateMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskMethod=daily &taskStartTime=20:00&taskEndTime=21:00&taskStatus=disable&taskEffectFrom=2010-05-24%2016:48&taskName=dr1&taskType=monitor&resourceid=10000055
<AppManager-response uri="/AppManager/xml/CreateMaintenanceTask">
<result>
<response response-code="4000">
<message>Maintenance Task successfully created.</message>
</response>
</result>
</AppManager-response>
https://[HOST]:[PORT]/AppManager/xml/CreateMaintenanceTask?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]
Supported HTTP methods: POST
Allowed roles: Administrator, Operator
The parameters involved in the API request are described below. Also, refer to the list of common request parameters.
Field | Description |
---|---|
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) |
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. |
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 |
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 |
https://apm-prod-server:8443/AppManager/xml/CreateMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskType=monitor &resourceid=10000028&totalNumber=1&taskMethod=weekly&taskDescription=&taskStatus=disable&taskEffectFrom=2010-06-01%2011:25 &startDay1=tuesday&startTime1=10:00&endDay1=friday&endTime1=12:00&taskName=week
Note: You can create up to 7 weekly schedules at one go.
Supported HTTP methods: POST
Allowed roles: Administrator, Operator
Supported HTTP methods: POST
Allowed roles: Administrator, Operator
The parameters involved in the API request are described below. Also, refer to the list of common request parameters.
Field | Description |
---|---|
apikey | 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. |
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. |
last1 | This option enables you to specify the date in reverse order. This is not mandatory. Value should be 'on' if this is included. |
https://[HOST]:[PORT]/AppManager/xml/CreateMaintenanceTask?apikey=[apikey]&totalNumber=[1-5]&taskMethod=once&customTaskStartTime1=[yyyy-mm-dd HH:mm]&customTaskEndTime1=[yyyy-mm-dd HH:mm]&customTaskStartTime2=[yyyy-mm-dd HH:mm]&customTaskEndTime2=[yyyy-mm-dd HH:mm]&taskStatus=[enable/disable]&taskName=[NAME]&taskType=[monitor/group]&taskDescription=[Description]&resourceid=[ResourceID]&totalNumber=[1-5]
Supported HTTP methods: POST
Allowed roles: Administrator, Operator
The parameters involved in the API request are described below. Also, refer to the list of common request parameters.
Field | Description |
---|---|
apikey | The key generated from "Generate API Key" option in the Settings tab. |
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 |
totalNumber | Number of schedules. You can specify upto 5 schedules. |
Without totalNumber parameter:
https://apm-prod-server:8443/AppManager/xml/CreateMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskMethod=once&customTaskStartTime=2010-06-03%2012:46&customTaskEndTime=2010-06-05%2012:46&taskStatus=disable&taskName=once &taskType=monitor&taskDescription=&resourceid=10000322
With totalNumber parameter:
https://apm-prod-server:8443/AppManager/xml/CreateMaintenanceTask?apikey=aaaaaabbbbbbccccccddddddeeeeee&taskMethod=once&customTaskStartTime1=2010-06-03%2012:46&customTaskEndTime1=2010-06-05%2012:46&customTaskStartTime2=2010-07-03%2012:46&customTaskEndTime2=2010-07-05%2012:46&taskStatus=disable&taskName=once &taskType=monitor&taskDescription=once with 2 shedules&resourceid=10000322&totalNumber=2