Page 1 of 1

disable/enable notifications via rest api

Posted: Fri Aug 04, 2017 2:34 pm
by jh129666
I found the below commands to disable/enable notifications via the rest API.

What are the rest API commands to disable/enable notifications for all services in a hostgroup, including the hosts?

curl -XPOST "http://192.168.x.x/nagiosxi/api/v1/conf ... u&pretty=1" -d "host_name=localhost&address=127.0.0.1&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&notifications_enabled=0&applyconfig=1"

curl -XPOST "http://192.168.x.x/nagiosxi/api/v1/conf ... u&pretty=1" -d "host_name=localhost&address=127.0.0.1&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&notifications_enabled=1&applyconfig=1"



Thanks,

Jeff

Re: disable/enable notifications via rest api

Posted: Fri Aug 04, 2017 2:49 pm
by scottwilkerson
At present there isn't a single command that would do them all in bulk. You would need to process the command for each separately.

Re: disable/enable notifications via rest api

Posted: Wed Dec 13, 2017 3:31 pm
by matson-itops
any hope of getting api to disable / enable service checks?

Re: disable/enable notifications via rest api

Posted: Thu Dec 14, 2017 10:11 am
by kyang
Hi matson-itops,

I think we were working on another thread about this question?

May we continue on that one so us techs don't answer a question twice?

Thanks for understanding!

Otherwise, there will be more API-end points coming in XI 5.5

https://www.nagios.com/roadmaps/