Page 1 of 1

REST API to delete all services on host

Posted: Thu Dec 14, 2017 12:47 pm
by madhu2852
Hi,

I've a question for you guys , is there a way that i can delete all the services related to a host using an API call. I know there is an object reference guide which shows how to list,add,delete the host and services individually but my request to give a hostname somewhere in the api call and it should delete all the services associated to the host.

Regards,
Madhu

Re: REST API to delete all services on host

Posted: Thu Dec 14, 2017 4:24 pm
by npolovenko
Hello, @madhu2852. This is not supported as of right now. However, there're more API features coming in the XI 5.5.0 release. Keep an eye on our website.

Re: REST API to delete all services on host

Posted: Mon Jan 29, 2018 6:58 am
by dusan
It would be really great to have this option (to automate host removal via API).
Will it make it to 5.5?

No mentions at the moment in https://assets.nagios.com/downloads/nag ... 1514284966

Re: REST API to delete all services on host

Posted: Mon Jan 29, 2018 2:08 pm
by npolovenko
@dusan, I talked to our Dev team and they told me that this feature is indeed on a roadmap. However, implementing object association is a bit tricky when services have children services or other dependencies. Nagios'd have to trace those dependencies and get rid of them as well. Otherwise, that could cause configuration problems. So yes, this feature request does already exist but It'll probably take some time to be released. No exact date or version yet.