Nagios XI API Key
Posted: Fri Sep 17, 2021 10:04 am
Hello Team,
We are trying to make below nagios api call through through script and somehow it is only working for user api key with admin privileges and not working for non-admin user api key. Please let us know if user needs admin privilege to execute API calls ?
If non admin user can execute api call then what user permissions needs to be given.
We are using below script
starttime=$(date +%s)
endtime=$(date -d '+3 hour' +"%s")
hostgroup=Bradenton-CAA
comments=maintenance-mode-enabled
curl -k -XPOST "https://infra-nagios.com/nagiosxi/api/v ... 5&pretty=1" -d "comment=$comments&start=$starttime&end=$endtime&hostgroups[]=$hostgroup"
Best Regards,
bsanjay
We are trying to make below nagios api call through through script and somehow it is only working for user api key with admin privileges and not working for non-admin user api key. Please let us know if user needs admin privilege to execute API calls ?
If non admin user can execute api call then what user permissions needs to be given.
We are using below script
starttime=$(date +%s)
endtime=$(date -d '+3 hour' +"%s")
hostgroup=Bradenton-CAA
comments=maintenance-mode-enabled
curl -k -XPOST "https://infra-nagios.com/nagiosxi/api/v ... 5&pretty=1" -d "comment=$comments&start=$starttime&end=$endtime&hostgroups[]=$hostgroup"
Best Regards,
bsanjay