Unable to delete service using curl 'XDELTE' on Nagios XI 5.
Posted: Fri Sep 18, 2020 9:44 am
This is the command I am trying to use
curl -XDELETE "https://<Nagios XI Host Name>/nagiosxi/api/v1/config/service?apikey=tBNRmsqitghiurFNECXKOu7RjkI6AEOX7p8egoCQKvelfSoSLmCvAB&pretty=1&host_name=testapihost&service_description=Disk Usage on /usr/local&applyconfig=1" -k
Here is the error I get.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
Collapse
Could someone help me with this? . I have got 1000+ servers and I need to delete/remove a 'Disk/File system' service
curl -XDELETE "https://<Nagios XI Host Name>/nagiosxi/api/v1/config/service?apikey=tBNRmsqitghiurFNECXKOu7RjkI6AEOX7p8egoCQKvelfSoSLmCvAB&pretty=1&host_name=testapihost&service_description=Disk Usage on /usr/local&applyconfig=1" -k
Here is the error I get.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
Collapse
Could someone help me with this? . I have got 1000+ servers and I need to delete/remove a 'Disk/File system' service