Dear jankar
The short answer is: That is not possible.
The long answer is: It is possible in principle, however we don't provide technical support for this. Only some parts of PRTG management can be accessed through the API. Of that, only a part is documented.
If you manually change the schedule for an object and analyse the HTTP POST generated by the webinterface, you could try to create your own API call derived from that POST.
Another option would be to stop the PRTG core service and change the "PRTG Configuration.dat" (which is an XML file) directly. However, this method is not recommended as it is very easy to unintentionally damage the configuration.
There is a way to pause objects via the API. That would be the alternative: Write a script which pauses / resumes objects instead of changing the schedule attached.
To pause an object for x minutes:
/api/pauseobjectfor.htm?id=objectid&pausemsg=yourmessage&duration=x
To pause it until it is resumed:
/api/pause.htm?id=objectid&pausemsg=yourmessage&action=0
To resume it:
/api/pause.htm?id=objectid&action=1
Add comment