Is there an API call to set a maintenance window for a group? I found an old KB question (https://helpdesk.paessler.com/en/support/solutions/articles/57793-plan-maintenance-window-via-api) but was unable to make it work.


Article Comments

Hello,

These API calls should still work. You may need to break the inheritance for "Schedules, Dependencies and Maintenance Windows"first. You may also need to provide credentials within the API call. this can look like this:

/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=Inheritscheduledependency&value=0
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintenable&value=1
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintstart&value=(Date in the format YYYY-MM-DD-HH-MM-SS)
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintend&value=(Date in the format YYYY-MM-DD-HH-MM-SS)
Also have a look here.


Jun, 2021 - Permalink

I figured it out. I had to set up a schedule that's always on, turn off inheritance, and set it to that schedule. Then the other three API calls actually set up a maintenance window.

It does appear the sequence also matters - maintstart, then maintend, then maintenable.


Jun, 2021 - Permalink