I am very new to Rest API. Does anyone know how to create a script that will allow me to create an array of servers called host and delete all services attached to the host. In Nagios XI example cURL request to remove service is:
curl -XDELETE "
https://nagiosservername/nagiosxi/api/v1/config/service?apikey=JNKelhL55D47u6GvniX7Y8oOlaQQ2V2LI3YjjZnoCKun6qVsLSS0gAOUJUK2P23N&pretty=1&host_name=testapihost&service_description=PING&applyconfig=1"
What I need to do is delete 700 servers from my Nagios XI install. In order to do that I need to first delete all that is configured for each host including all the services and host groups.