Been looking into the API functions and one of the functions I am missing is to be able to set a device in maintenance. The existing function (maintenance_device) does not let me choose the start date/time, which I find a bit frustrating. It’s actually the same in the GUI (settings for a device). We have an external system where we notify clients if their connection is offline for some reason. Often we plan maintenance ahead and I would like to be able to set maintenance for a device, based on location or group (or a single device) in the future. Been playing around with api_functions.inc.php (in conjunction with editing of api.php in /librenm/routes/) with no luck at all.
I have successfullt been able to add a function to the API listing the current scheduled maintenance in our lab environment so far, but that’s just a small part of what I need.
Also, the “maintenance_device” API function is misdocumented. The function’s endpoint is /devices//maintenance