possible for a non-admin user to schedule downtime via API?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
travisjburrell
Posts: 14
Joined: Thu Sep 24, 2020 12:36 pm

possible for a non-admin user to schedule downtime via API?

Post by travisjburrell »

We'd like to be able to create a service acct to allow scheduling of downtime for hosts programmatically, via the API. Is this possible without that user being at the admin level? We don't want this user/API key able to make any other configuration/system changes, for example.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: possible for a non-admin user to schedule downtime via A

Post by pbroste »

Hello @travisjburrell

Thanks for reaching out, hopped on over to my test VM today and set every configuration known and see that you are correct that the 'schedule downtime' requires 'Admin'. The following is also true on the Core Management side as well.
curl -XPOST "https://192.168.23.200/nagiosxi/api/v1/ ... t&pretty=1" -d "comment=Test downtime creation&start=1642183784&end=1642190984&hosts[]=localhost" -k
{
"error": "Authenticiation failed."
}
and on cgi-bin:
curl -d "cmd_typ=55&cmd_mod=2&host=localhost&com_data=TestingDowntime&trigger=0&start_time=03-13-2015 11:30:00&end_time=03-13-2015 11:40:00&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi" -u "crazyperson:password123"
Thanks,
Perry
travisjburrell
Posts: 14
Joined: Thu Sep 24, 2020 12:36 pm

Re: possible for a non-admin user to schedule downtime via A

Post by travisjburrell »

Thanks Perry - I was afraid of that. In that case, do you have any recommendation for segmenting the permissions in any way/shape/form? Or is it just not possible, and we should just go with the admin-level user for downtime API calls?
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: possible for a non-admin user to schedule downtime via A

Post by pbroste »

Hello @travisjburrell

Thanks for following up and you are correct that it is written in such away that there are no workarounds.

I will go ahead and add this to our feature request for future product improvements. Please keep an eye on the enhancement change-log.

Thanks,
Perry
travisjburrell
Posts: 14
Joined: Thu Sep 24, 2020 12:36 pm

Re: possible for a non-admin user to schedule downtime via A

Post by travisjburrell »

Thanks Perry - appreciate it.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: possible for a non-admin user to schedule downtime via A

Post by pbroste »

Hello @travisjburrell; I will go ahead and lock this one.

Thanks
Perry
Locked