Nagios xi API Key

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
bsanjay
Posts: 86
Joined: Mon Apr 29, 2019 9:38 am

Nagios xi API Key

Post by bsanjay »

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
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Nagios xi API Key

Post by pbroste »

Hello @bsanjay,

You are correct and verified that to schedule downtime the User account is required an Admin role.

Thanks,
Perry