I can schedule a downtime (via Powershell) correctly by using an API Key, but when I use the API Key from a special created admin account, and set the "author" parameter, the author for the downtime (in the webui and API) is still the user the API key belongs to.
A small piece of my Powershell code:
Code: Select all
$author = "exampleuser"
$uri = "http://$nagsrv/nagiosxi/api/v1/system/scheduleddowntime?apikey=$apikey"
$body = "author=$author&comment=$comment&all_services=1&duration=$duration&start=$starttime&end=$endtime&hosts[]=$hostname"
$downtimejson = Invoke-RestMethod -Uri $uri -Method Post -Body $body
PS: We have a licensed NagiosXI install, but cannot post in the Customer section on this forum.